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) {
|
||||
if (this.hasSelection) {
|
||||
this.hasSelection = false;
|
||||
|
||||
if (this.dragMode_) {
|
||||
$.publish(Events.SELECTION_PASTE);
|
||||
this.dragMode_ = false;
|
||||
}
|
||||
|
||||
overlay.clear();
|
||||
$.publish(Events.SELECTION_DISMISSED);
|
||||
this.dismissSelection();
|
||||
} else {
|
||||
this.hasSelection = true;
|
||||
this.onDragSelectStart_(col, row);
|
||||
|
@ -49,8 +49,8 @@
|
||||
this.onSelectStart_(col, row, frame, overlay);
|
||||
} else {
|
||||
this.mode = 'moveSelection';
|
||||
if (event.shiftKey && !this.dragMode_) {
|
||||
this.dragMode_ = true;
|
||||
if (event.shiftKey && !this.isMovingContent_) {
|
||||
this.isMovingContent_ = true;
|
||||
$.publish(Events.SELECTION_CUT);
|
||||
}
|
||||
this.onSelectionMoveStart_(col, row, frame, overlay);
|
||||
@ -112,9 +112,9 @@
|
||||
* Protected method, should be called when the selection is dismissed.
|
||||
*/
|
||||
ns.BaseSelect.prototype.dismissSelection = function () {
|
||||
if (this.dragMode_) {
|
||||
if (this.isMovingContent_) {
|
||||
$.publish(Events.SELECTION_PASTE);
|
||||
this.dragMode_ = false;
|
||||
this.isMovingContent_ = false;
|
||||
}
|
||||
|
||||
// Clean previous selection:
|
||||
|
Loading…
Reference in New Issue
Block a user