[dnd] revert the change to only allow dropping on reactive actors
Workspace.actor is non-reactive, and there's probably some good reason for this. So just have the add workspace button check its own reactivity.
This commit is contained in:
parent
d9008054cf
commit
ed75f0da63
@ -250,7 +250,7 @@ _Draggable.prototype = {
|
|||||||
dropX, dropY);
|
dropX, dropY);
|
||||||
this._dragActor.show();
|
this._dragActor.show();
|
||||||
while (target) {
|
while (target) {
|
||||||
if (target.reactive && target._delegate && target._delegate.acceptDrop) {
|
if (target._delegate && target._delegate.acceptDrop) {
|
||||||
let [targX, targY] = target.get_transformed_position();
|
let [targX, targY] = target.get_transformed_position();
|
||||||
if (target._delegate.acceptDrop(this.actor._delegate, this._dragActor,
|
if (target._delegate.acceptDrop(this.actor._delegate, this._dragActor,
|
||||||
(dropX - targX) / target.scale_x,
|
(dropX - targX) / target.scale_x,
|
||||||
|
@ -511,6 +511,6 @@ AddWorkspaceButton.prototype = {
|
|||||||
|
|
||||||
// Draggable target interface
|
// Draggable target interface
|
||||||
acceptDrop: function(source, actor, x, y, time) {
|
acceptDrop: function(source, actor, x, y, time) {
|
||||||
return this._acceptDropCallback(source, actor, x, y, time);
|
return this.reactive && this._acceptDropCallback(source, actor, x, y, time);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user