mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Removed all global variables, worked on File class and put canvas resizing functions in File
This commit is contained in:
@@ -13,7 +13,7 @@ class ResizableTool extends Tool {
|
||||
|
||||
onRightDrag(mousePos, mouseEvent) {
|
||||
//get new brush size based on x distance from original clicking location
|
||||
let distanceFromClick = mousePos[0]/zoom - this.startResizePos[0]/zoom;
|
||||
let distanceFromClick = mousePos[0]/currFile.zoom - this.startResizePos[0]/currFile.zoom;
|
||||
|
||||
let brushSizeChange = Math.round(distanceFromClick/10);
|
||||
let newBrushSize = this.currSize + brushSizeChange;
|
||||
|
||||
Reference in New Issue
Block a user