Compare commits
3 Commits
citadel
...
gbsneto/dn
Author | SHA1 | Date | |
---|---|---|---|
|
87de09a83e | ||
|
b65b4e3cae | ||
|
5880758709 |
15
js/ui/dnd.js
15
js/ui/dnd.js
@ -642,12 +642,13 @@ var _Draggable = class _Draggable {
|
|||||||
this._dragState = DragState.CANCELLED;
|
this._dragState = DragState.CANCELLED;
|
||||||
|
|
||||||
if (this._actorDestroyed || wasCancelled) {
|
if (this._actorDestroyed || wasCancelled) {
|
||||||
|
let dragActor = this._dragActor;
|
||||||
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||||
if (!this._buttonDown)
|
if (!this._buttonDown)
|
||||||
this._dragComplete();
|
this._dragComplete();
|
||||||
this.emit('drag-end', eventTime, false);
|
this.emit('drag-end', eventTime, false);
|
||||||
if (!this._dragOrigParent && this._dragActor)
|
if (!this._dragOrigParent && dragActor)
|
||||||
this._dragActor.destroy();
|
dragActor.destroy();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -702,17 +703,17 @@ var _Draggable = class _Draggable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_onAnimationComplete(dragActor, eventTime) {
|
_onAnimationComplete(dragActor, eventTime) {
|
||||||
|
this.emit('drag-end', eventTime, false);
|
||||||
|
this._finishAnimation();
|
||||||
|
|
||||||
if (this._dragOrigParent) {
|
if (this._dragOrigParent) {
|
||||||
Main.uiGroup.remove_child(this._dragActor);
|
Main.uiGroup.remove_child(dragActor);
|
||||||
this._dragOrigParent.add_actor(this._dragActor);
|
this._dragOrigParent.add_actor(dragActor);
|
||||||
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
|
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
|
||||||
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
||||||
} else {
|
} else {
|
||||||
dragActor.destroy();
|
dragActor.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.emit('drag-end', eventTime, false);
|
|
||||||
this._finishAnimation();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_dragComplete() {
|
_dragComplete() {
|
||||||
|
Loading…
Reference in New Issue
Block a user