diff --git a/src/js/app.js b/src/js/app.js index 28225379..e98101d3 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -54,8 +54,8 @@ this.minimapController = new pskl.controller.MinimapController(this.piskelController, this.animationController, this.drawingController, $('#preview-canvas-container')); this.minimapController.init(); - this.previewsController = new pskl.controller.PreviewFilmController(this.piskelController, $('#preview-list')); - this.previewsController.init(); + this.previewFilmController = new pskl.controller.PreviewFilmController(this.piskelController, $('#preview-list')); + this.previewFilmController.init(); this.layersListController = new pskl.controller.LayersListController(this.piskelController); this.layersListController.init(); @@ -144,7 +144,7 @@ render : function (delta) { this.drawingController.render(delta); this.animationController.render(delta); - this.previewsController.render(delta); + this.previewFilmController.render(delta); }, readSizeFromURL_ : function () { diff --git a/src/js/drawingtools/selectiontools/BaseSelect.js b/src/js/drawingtools/selectiontools/BaseSelect.js index 29bd9f85..3738a3f3 100644 --- a/src/js/drawingtools/selectiontools/BaseSelect.js +++ b/src/js/drawingtools/selectiontools/BaseSelect.js @@ -34,16 +34,14 @@ // mode to create a selection. // 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. - if(overlay.getPixel(col, row) != Constants.SELECTION_TRANSPARENT_COLOR) { - - this.mode = "select"; - this.onSelectStart_(col, row, color, frame, overlay); - } - else { - + if(this.isInSelection(col, row)) { this.mode = "moveSelection"; this.onSelectionDragStart_(col, row, color, frame, overlay); } + else { + this.mode = "select"; + this.onSelectStart_(col, row, color, frame, overlay); + } }; /**