From 69393127fa3edd2d1ad9c7d245fe8fb0000022ee Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Mon, 1 Aug 2016 11:58:07 +0200 Subject: [PATCH] Issue #290: rename dismissSelection to commitSelection --- src/js/selection/SelectionManager.js | 4 ++-- src/js/tools/drawing/selection/AbstractDragSelect.js | 2 +- src/js/tools/drawing/selection/BaseSelect.js | 2 +- src/js/tools/drawing/selection/ShapeSelect.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/selection/SelectionManager.js b/src/js/selection/SelectionManager.js index dfb21cbf..3e10ec72 100644 --- a/src/js/selection/SelectionManager.js +++ b/src/js/selection/SelectionManager.js @@ -112,7 +112,7 @@ }; /** - * If the currently selected tool is a selection tool, call dismissSelection handler on + * If the currently selected tool is a selection tool, call commitSelection handler on * the current tool instance. */ ns.SelectionManager.prototype.commit = function() { @@ -120,7 +120,7 @@ var isSelectionTool = tool instanceof pskl.tools.drawing.selection.BaseSelect; if (isSelectionTool) { var overlay = pskl.app.drawingController.overlayFrame; - tool.dismissSelection(overlay); + tool.commitSelection(overlay); } }; diff --git a/src/js/tools/drawing/selection/AbstractDragSelect.js b/src/js/tools/drawing/selection/AbstractDragSelect.js index c6fa9417..c5671b5d 100644 --- a/src/js/tools/drawing/selection/AbstractDragSelect.js +++ b/src/js/tools/drawing/selection/AbstractDragSelect.js @@ -16,7 +16,7 @@ ns.AbstractDragSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) { if (this.hasSelection) { this.hasSelection = false; - this.dismissSelection(overlay); + this.commitSelection(overlay); } else { this.hasSelection = true; this.onDragSelectStart_(col, row); diff --git a/src/js/tools/drawing/selection/BaseSelect.js b/src/js/tools/drawing/selection/BaseSelect.js index 6999dfd0..9af0273d 100644 --- a/src/js/tools/drawing/selection/BaseSelect.js +++ b/src/js/tools/drawing/selection/BaseSelect.js @@ -113,7 +113,7 @@ /** * Protected method, should be called when the selection is dismissed. */ - ns.BaseSelect.prototype.dismissSelection = function (overlay) { + ns.BaseSelect.prototype.commitSelection = function (overlay) { if (this.isMovingContent_) { $.publish(Events.SELECTION_PASTE); this.isMovingContent_ = false; diff --git a/src/js/tools/drawing/selection/ShapeSelect.js b/src/js/tools/drawing/selection/ShapeSelect.js index 0aa496be..7e9073ca 100644 --- a/src/js/tools/drawing/selection/ShapeSelect.js +++ b/src/js/tools/drawing/selection/ShapeSelect.js @@ -24,7 +24,7 @@ ns.ShapeSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) { if (this.hasSelection) { this.hasSelection = false; - this.dismissSelection(overlay); + this.commitSelection(overlay); } else { this.hasSelection = true; // From the pixel clicked, get shape using an algorithm similar to the paintbucket one: