mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Added back tool shortctus
Made Events an IIFE instead of a class, fixed a bug in the selection tool.
This commit is contained in:
@@ -14,8 +14,6 @@ class RectangularSelectionTool extends SelectionTool {
|
||||
onStart(mousePos) {
|
||||
super.onStart(mousePos);
|
||||
|
||||
// Saving the canvas
|
||||
new HistoryState().EditCanvas();
|
||||
// Putting the vfx layer on top of everything
|
||||
VFXLayer.canvas.style.zIndex = MAX_Z_INDEX;
|
||||
|
||||
@@ -51,6 +49,7 @@ class RectangularSelectionTool extends SelectionTool {
|
||||
|
||||
onEnd(mousePos) {
|
||||
super.onEnd(mousePos);
|
||||
new HistoryState().EditCanvas();
|
||||
|
||||
// Getting the end position
|
||||
this.endMousePos[0] = Math.round(this.endMousePos[0] / zoom) + 0.5;
|
||||
|
||||
Reference in New Issue
Block a user