[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:
Dan Winship 2010-01-20 14:01:37 -05:00
parent d9008054cf
commit ed75f0da63
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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);
} }
}; };