mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Fixed selection tools dragging when the cursor is not in the selection
This commit is contained in:
@@ -75,6 +75,9 @@ class MoveSelectionTool extends DrawingTool {
|
||||
|
||||
onDrag(mousePos) {
|
||||
super.onDrag(mousePos);
|
||||
|
||||
if (!this.selectionTool.cursorInSelectedArea(mousePos))
|
||||
return;
|
||||
|
||||
this.selectionTool.moveOffset =
|
||||
[Math.floor(mousePos[0] / currFile.zoom - currFile.canvasSize[0] / 2 - (this.selectionTool.boundingBoxCenter[0] - currFile.canvasSize[0]/2)),
|
||||
|
||||
Reference in New Issue
Block a user