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;
|
||||
|
||||
if (this._actorDestroyed || wasCancelled) {
|
||||
let dragActor = this._dragActor;
|
||||
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
||||
if (!this._buttonDown)
|
||||
this._dragComplete();
|
||||
this.emit('drag-end', eventTime, false);
|
||||
if (!this._dragOrigParent && this._dragActor)
|
||||
this._dragActor.destroy();
|
||||
if (!this._dragOrigParent && dragActor)
|
||||
dragActor.destroy();
|
||||
|
||||
return;
|
||||
}
|
||||
@ -702,17 +703,17 @@ var _Draggable = class _Draggable {
|
||||
}
|
||||
|
||||
_onAnimationComplete(dragActor, eventTime) {
|
||||
this.emit('drag-end', eventTime, false);
|
||||
this._finishAnimation();
|
||||
|
||||
if (this._dragOrigParent) {
|
||||
Main.uiGroup.remove_child(this._dragActor);
|
||||
this._dragOrigParent.add_actor(this._dragActor);
|
||||
Main.uiGroup.remove_child(dragActor);
|
||||
this._dragOrigParent.add_actor(dragActor);
|
||||
dragActor.set_scale(this._dragOrigScale, this._dragOrigScale);
|
||||
dragActor.set_position(this._dragOrigX, this._dragOrigY);
|
||||
} else {
|
||||
dragActor.destroy();
|
||||
}
|
||||
|
||||
this.emit('drag-end', eventTime, false);
|
||||
this._finishAnimation();
|
||||
}
|
||||
|
||||
_dragComplete() {
|
||||
|
Loading…
Reference in New Issue
Block a user