Commit 4be03da 1 parent de90e31 commit 4be03da Copy full SHA for 4be03da
File tree 2 files changed +4
-28
lines changed
2 files changed +4
-28
lines changed Original file line number Diff line number Diff line change 9
9
"email" : " dev7355608@gmail.com"
10
10
}
11
11
],
12
- "version" : " 2.0.9 " ,
12
+ "version" : " 2.0.10 " ,
13
13
"compatibility" : {
14
14
"minimum" : " 10" ,
15
15
"verified" : " 11"
28
28
},
29
29
"url" : " https://github.com/dev7355608/advanced-drawing-tools" ,
30
30
"manifest" : " https://raw.githubusercontent.com/dev7355608/advanced-drawing-tools/main/module.json" ,
31
- "download" : " https://github.com/dev7355608/advanced-drawing-tools/releases/download/v2.0.9 /module.zip" ,
32
- "changelog" : " https://github.com/dev7355608/advanced-drawing-tools/releases/tag/v2.0.9 " ,
31
+ "download" : " https://github.com/dev7355608/advanced-drawing-tools/releases/download/v2.0.10 /module.zip" ,
32
+ "changelog" : " https://github.com/dev7355608/advanced-drawing-tools/releases/tag/v2.0.10 " ,
33
33
"bugs" : " https://github.com/dev7355608/advanced-drawing-tools/issues" ,
34
34
"readme" : " https://raw.githubusercontent.com/dev7355608/advanced-drawing-tools/main/README.md" ,
35
35
"license" : " https://raw.githubusercontent.com/dev7355608/advanced-drawing-tools/main/LICENSE"
Original file line number Diff line number Diff line change @@ -47,31 +47,7 @@ Hooks.once("libWrapper.Ready", () => {
47
47
} , libWrapper . OVERRIDE ) ;
48
48
} else {
49
49
Drawing . prototype . _rescaleDimensions = function ( original , dx , dy ) {
50
- let { points, width, height } = original . shape ;
51
- width += dx ;
52
- height += dy ;
53
- points = points || [ ] ;
54
-
55
- // Rescale polygon points
56
- if ( this . isPolygon ) {
57
- const scaleX = 1 + ( dx / original . shape . width ) ;
58
- const scaleY = 1 + ( dy / original . shape . height ) ;
59
- points = points . map ( ( p , i ) => p * ( i % 2 ? scaleY : scaleX ) ) ;
60
- }
61
-
62
- // Constrain drawing bounds by the contained text size
63
- if ( this . document . text ) {
64
- const textBounds = this . text . getLocalBounds ( ) ;
65
- width = Math . max ( textBounds . width + 16 , width ) ;
66
- height = Math . max ( textBounds . height + 8 , height ) ;
67
- }
68
-
69
- // Normalize the shape
70
- return this . constructor . normalizeShape ( {
71
- x : original . x ,
72
- y : original . y ,
73
- shape : { width : Math . round ( width ) , height : Math . round ( height ) , points }
74
- } ) ;
50
+ return Drawing . rescaleDimensions ( original , dx , dy ) ;
75
51
} ;
76
52
}
77
53
} ) ;
You can’t perform that action at this time.
0 commit comments