@@ -132,7 +132,8 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
132
132
133
133
var xPixelSized = shapeOptions . xsizemode === 'pixel' ,
134
134
yPixelSized = shapeOptions . ysizemode === 'pixel' ,
135
- isLine = shapeOptions . type === 'line' ;
135
+ isLine = shapeOptions . type === 'line' ,
136
+ isPath = shapeOptions . type === 'path' ;
136
137
137
138
var update ;
138
139
var x0 , y0 , x1 , y1 , xAnchor , yAnchor , astrX0 , astrY0 , astrX1 , astrY1 , astrXAnchor , astrYAnchor ;
@@ -232,7 +233,7 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
232
233
h = dragBBox . bottom - dragBBox . top ,
233
234
x = evt . clientX - dragBBox . left ,
234
235
y = evt . clientY - dragBBox . top ,
235
- cursor = ( w > MINWIDTH && h > MINHEIGHT && ! evt . shiftKey ) ?
236
+ cursor = ( ! isPath && w > MINWIDTH && h > MINHEIGHT && ! evt . shiftKey ) ?
236
237
dragElement . getCursor ( x / w , 1 - y / h ) :
237
238
'move' ;
238
239
@@ -358,8 +359,8 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
358
359
}
359
360
360
361
function resizeShape ( dx , dy ) {
361
- if ( shapeOptions . type === 'path' ) {
362
- // TODO: implement path resize
362
+ if ( isPath ) {
363
+ // TODO: implement path resize, don't forget to update dragMode code
363
364
var noOp = function ( coord ) { return coord ; } ,
364
365
moveX = noOp ,
365
366
moveY = noOp ;
0 commit comments