@@ -132,7 +132,8 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
132132
133133 var xPixelSized = shapeOptions . xsizemode === 'pixel' ,
134134 yPixelSized = shapeOptions . ysizemode === 'pixel' ,
135- isLine = shapeOptions . type === 'line' ;
135+ isLine = shapeOptions . type === 'line' ,
136+ isPath = shapeOptions . type === 'path' ;
136137
137138 var update ;
138139 var x0 , y0 , x1 , y1 , xAnchor , yAnchor , astrX0 , astrY0 , astrX1 , astrY1 , astrXAnchor , astrYAnchor ;
@@ -232,7 +233,7 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
232233 h = dragBBox . bottom - dragBBox . top ,
233234 x = evt . clientX - dragBBox . left ,
234235 y = evt . clientY - dragBBox . top ,
235- cursor = ( w > MINWIDTH && h > MINHEIGHT && ! evt . shiftKey ) ?
236+ cursor = ( ! isPath && w > MINWIDTH && h > MINHEIGHT && ! evt . shiftKey ) ?
236237 dragElement . getCursor ( x / w , 1 - y / h ) :
237238 'move' ;
238239
@@ -358,8 +359,8 @@ function setupDragElement(gd, shapePath, shapeOptions, index, shapeLayer) {
358359 }
359360
360361 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
363364 var noOp = function ( coord ) { return coord ; } ,
364365 moveX = noOp ,
365366 moveY = noOp ;
0 commit comments