mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Issue #290: rename dismissSelection to commitSelection
This commit is contained in:
parent
fc7fc6d9b0
commit
69393127fa
@ -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.
|
* the current tool instance.
|
||||||
*/
|
*/
|
||||||
ns.SelectionManager.prototype.commit = function() {
|
ns.SelectionManager.prototype.commit = function() {
|
||||||
@ -120,7 +120,7 @@
|
|||||||
var isSelectionTool = tool instanceof pskl.tools.drawing.selection.BaseSelect;
|
var isSelectionTool = tool instanceof pskl.tools.drawing.selection.BaseSelect;
|
||||||
if (isSelectionTool) {
|
if (isSelectionTool) {
|
||||||
var overlay = pskl.app.drawingController.overlayFrame;
|
var overlay = pskl.app.drawingController.overlayFrame;
|
||||||
tool.dismissSelection(overlay);
|
tool.commitSelection(overlay);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
ns.AbstractDragSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) {
|
ns.AbstractDragSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) {
|
||||||
if (this.hasSelection) {
|
if (this.hasSelection) {
|
||||||
this.hasSelection = false;
|
this.hasSelection = false;
|
||||||
this.dismissSelection(overlay);
|
this.commitSelection(overlay);
|
||||||
} else {
|
} else {
|
||||||
this.hasSelection = true;
|
this.hasSelection = true;
|
||||||
this.onDragSelectStart_(col, row);
|
this.onDragSelectStart_(col, row);
|
||||||
|
@ -113,7 +113,7 @@
|
|||||||
/**
|
/**
|
||||||
* Protected method, should be called when the selection is dismissed.
|
* 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_) {
|
if (this.isMovingContent_) {
|
||||||
$.publish(Events.SELECTION_PASTE);
|
$.publish(Events.SELECTION_PASTE);
|
||||||
this.isMovingContent_ = false;
|
this.isMovingContent_ = false;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
ns.ShapeSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) {
|
ns.ShapeSelect.prototype.onSelectStart_ = function (col, row, frame, overlay) {
|
||||||
if (this.hasSelection) {
|
if (this.hasSelection) {
|
||||||
this.hasSelection = false;
|
this.hasSelection = false;
|
||||||
this.dismissSelection(overlay);
|
this.commitSelection(overlay);
|
||||||
} else {
|
} else {
|
||||||
this.hasSelection = true;
|
this.hasSelection = true;
|
||||||
// From the pixel clicked, get shape using an algorithm similar to the paintbucket one:
|
// From the pixel clicked, get shape using an algorithm similar to the paintbucket one:
|
||||||
|
Loading…
Reference in New Issue
Block a user