File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ function handleDocumentMouseup(e) {
3333 input . style . top = `${ e . clientY } px` ;
3434 input . style . left = `${ e . clientX } px` ;
3535 input . style . fontSize = `${ _textSize } px` ;
36- input . style . zIndex = "41" ;
36+ input . style . zIndex = '41' ;
3737 input . addEventListener ( 'blur' , handleInputBlur ) ;
3838 input . addEventListener ( 'keyup' , handleInputKeyup ) ;
3939
@@ -85,7 +85,7 @@ function saveText() {
8585 type : 'textbox' ,
8686 size : _textSize * scale ,
8787 color : _textColor ,
88- content : input . value ,
88+ content : value ,
8989 x : pt [ 0 ] ,
9090 y : pt [ 1 ] ,
9191 rotation : - viewport . rotation
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ export default function renderText(a) {
1818 y : a . y ,
1919 fill : normalizeColor ( a . color || '#000' ) ,
2020 fontSize : a . size ,
21- transform : `rotate(${ a . rotation } )`
21+ transform : `rotate(${ a . rotation } )` ,
22+ style : 'white-space: pre'
2223 } ) ;
2324 text . innerHTML = a . content ;
2425
You can’t perform that action at this time.
0 commit comments