mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-04 21:21:06 -05:00
Merge pull request #174 from nathan/backpack-duplicates
Fixed duplication when dragging media into the backpack
This commit is contained in:
commit
580148cbf2
1 changed files with 5 additions and 1 deletions
|
@ -452,9 +452,13 @@ public class GestureHandler {
|
||||||
possibleTargets.push(app.stagePane);
|
possibleTargets.push(app.stagePane);
|
||||||
}
|
}
|
||||||
possibleTargets.reverse();
|
possibleTargets.reverse();
|
||||||
|
var tried:Array = [];
|
||||||
for each (var o:* in possibleTargets) {
|
for each (var o:* in possibleTargets) {
|
||||||
while (o) { // see if some parent can handle the drop
|
while (o) { // see if some parent can handle the drop
|
||||||
if (('handleDrop' in o) && o.handleDrop(droppedObj)) return true;
|
if (tried.indexOf(o) == -1) {
|
||||||
|
if (('handleDrop' in o) && o.handleDrop(droppedObj)) return true;
|
||||||
|
tried.push(o);
|
||||||
|
}
|
||||||
o = o.parent;
|
o = o.parent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue