File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ export default {
164164 // editable: null,
165165 dx: 0 ,
166166 dy: 0 ,
167+ width: 0 ,
168+ height: 0 ,
167169 operation: ' ' ,
168170 size_: this .size ,
169171 lineHeight_: this .lineHeight ,
@@ -233,6 +235,8 @@ export default {
233235 this .operation = ' '
234236 },
235237 handlePanStart (event ) {
238+ this .width = this .$refs .editable .offsetWidth
239+ this .height = this .$refs .editable .offsetHeight
236240 let coordinate
237241 if (event .type === ' mousedown' ) {
238242 coordinate = this .handleMousedown (event )
Original file line number Diff line number Diff line change 153153 :text =" object.text"
154154 :x =" object.x"
155155 :y =" object.y"
156+ :width =" object.width"
157+ :height =" object.height"
156158 :show-line-size-select =" showLineSizeSelect"
157159 :show-font-size-select =" showFontSizeSelect"
158160 :show-font-select =" showFontSelect"
@@ -598,7 +600,6 @@ export default {
598600 text,
599601 type: ' text' ,
600602 size: this .textDefaultSize ,
601- width: 0 , // recalculate after editing
602603 lineHeight: 1.4 ,
603604 fontFamily: this .currentFont ,
604605 canvasWidth,
You can’t perform that action at this time.
0 commit comments