mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix : selection : click on non transparent pixel was cancelling selection
This commit is contained in:
parent
a060e32b15
commit
38f18360b8
@ -54,8 +54,8 @@
|
|||||||
this.minimapController = new pskl.controller.MinimapController(this.piskelController, this.animationController, this.drawingController, $('#preview-canvas-container'));
|
this.minimapController = new pskl.controller.MinimapController(this.piskelController, this.animationController, this.drawingController, $('#preview-canvas-container'));
|
||||||
this.minimapController.init();
|
this.minimapController.init();
|
||||||
|
|
||||||
this.previewsController = new pskl.controller.PreviewFilmController(this.piskelController, $('#preview-list'));
|
this.previewFilmController = new pskl.controller.PreviewFilmController(this.piskelController, $('#preview-list'));
|
||||||
this.previewsController.init();
|
this.previewFilmController.init();
|
||||||
|
|
||||||
this.layersListController = new pskl.controller.LayersListController(this.piskelController);
|
this.layersListController = new pskl.controller.LayersListController(this.piskelController);
|
||||||
this.layersListController.init();
|
this.layersListController.init();
|
||||||
@ -144,7 +144,7 @@
|
|||||||
render : function (delta) {
|
render : function (delta) {
|
||||||
this.drawingController.render(delta);
|
this.drawingController.render(delta);
|
||||||
this.animationController.render(delta);
|
this.animationController.render(delta);
|
||||||
this.previewsController.render(delta);
|
this.previewFilmController.render(delta);
|
||||||
},
|
},
|
||||||
|
|
||||||
readSizeFromURL_ : function () {
|
readSizeFromURL_ : function () {
|
||||||
|
@ -34,16 +34,14 @@
|
|||||||
// mode to create a selection.
|
// mode to create a selection.
|
||||||
// If the initial click is on a previous selection, we go in "moveSelection"
|
// If the initial click is on a previous selection, we go in "moveSelection"
|
||||||
// mode to allow to move the selection by drag'n dropping it.
|
// mode to allow to move the selection by drag'n dropping it.
|
||||||
if(overlay.getPixel(col, row) != Constants.SELECTION_TRANSPARENT_COLOR) {
|
if(this.isInSelection(col, row)) {
|
||||||
|
|
||||||
this.mode = "select";
|
|
||||||
this.onSelectStart_(col, row, color, frame, overlay);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
this.mode = "moveSelection";
|
this.mode = "moveSelection";
|
||||||
this.onSelectionDragStart_(col, row, color, frame, overlay);
|
this.onSelectionDragStart_(col, row, color, frame, overlay);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this.mode = "select";
|
||||||
|
this.onSelectStart_(col, row, color, frame, overlay);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user