Temporary fix for avoid image "jumping" on initial dragging
This commit is contained in:
@@ -28,6 +28,14 @@ function Draggable(img, boundingRect) {
|
||||
if (localBoundingRect) {
|
||||
_bounds = localBoundingRect;
|
||||
}
|
||||
|
||||
// @TODO Refactor this, see Viewport.calcMinMaxBoundsForRect
|
||||
if (img.canvas.getViewport().getData().axis === 'h') {
|
||||
_bounds.top.min = _bounds.top.max = img.top;
|
||||
} else {
|
||||
_bounds.left.min = _bounds.left.max = img.left;
|
||||
}
|
||||
|
||||
img.lockMovementX = img.lockMovementY = false;
|
||||
img.selectable = true;
|
||||
img.hoverCursor = 'move';
|
||||
|
||||
Reference in New Issue
Block a user