mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Started making selection tools more generic
Will also hopefully remove MoveSelection.js and put its functions in SelectionTool
This commit is contained in:
@ -76,8 +76,8 @@ class MoveSelectionTool extends DrawingTool {
|
||||
// put the image data on the tmp layer with offset
|
||||
currFile.TMPLayer.context.putImageData(
|
||||
this.currSelection.data,
|
||||
Math.round(mousePos[0] / currFile.zoom) - this.currSelection.width / 2,
|
||||
Math.round(mousePos[1] / currFile.zoom) - this.currSelection.height / 2);
|
||||
Math.floor(mousePos[0] / currFile.zoom - this.currSelection.width / 2),
|
||||
Math.floor(mousePos[1] / currFile.zoom - this.currSelection.height / 2));
|
||||
}
|
||||
|
||||
onEnd(mousePos) {
|
||||
|
Reference in New Issue
Block a user