mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Issue #290: change boolean flag name to isMovingContent in BaseSelect
This commit is contained in:
parent
0d1210e71f
commit
0d5dc21a41
@ -16,14 +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();
|
||||||
if (this.dragMode_) {
|
|
||||||
$.publish(Events.SELECTION_PASTE);
|
|
||||||
this.dragMode_ = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
overlay.clear();
|
|
||||||
$.publish(Events.SELECTION_DISMISSED);
|
|
||||||
} else {
|
} else {
|
||||||
this.hasSelection = true;
|
this.hasSelection = true;
|
||||||
this.onDragSelectStart_(col, row);
|
this.onDragSelectStart_(col, row);
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
this.onSelectStart_(col, row, frame, overlay);
|
this.onSelectStart_(col, row, frame, overlay);
|
||||||
} else {
|
} else {
|
||||||
this.mode = 'moveSelection';
|
this.mode = 'moveSelection';
|
||||||
if (event.shiftKey && !this.dragMode_) {
|
if (event.shiftKey && !this.isMovingContent_) {
|
||||||
this.dragMode_ = true;
|
this.isMovingContent_ = true;
|
||||||
$.publish(Events.SELECTION_CUT);
|
$.publish(Events.SELECTION_CUT);
|
||||||
}
|
}
|
||||||
this.onSelectionMoveStart_(col, row, frame, overlay);
|
this.onSelectionMoveStart_(col, row, frame, overlay);
|
||||||
@ -112,9 +112,9 @@
|
|||||||
* 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 () {
|
ns.BaseSelect.prototype.dismissSelection = function () {
|
||||||
if (this.dragMode_) {
|
if (this.isMovingContent_) {
|
||||||
$.publish(Events.SELECTION_PASTE);
|
$.publish(Events.SELECTION_PASTE);
|
||||||
this.dragMode_ = false;
|
this.isMovingContent_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean previous selection:
|
// Clean previous selection:
|
||||||
|
Loading…
Reference in New Issue
Block a user