mirror of
https://github.com/scratchfoundation/scratch-flash.git
synced 2024-12-12 09:01:18 -05:00
Merge pull request #183 from nathan/run-while-dragging
Fixed shadow disappearing when a script runs while being dragged
This commit is contained in:
commit
6cd8833215
1 changed files with 12 additions and 3 deletions
|
@ -299,13 +299,22 @@ public class Block extends Sprite {
|
|||
}
|
||||
|
||||
public function showRunFeedback():void {
|
||||
if (!filters || (filters.length == 0)) {
|
||||
filters = runFeedbackFilters();
|
||||
if (filters && filters.length > 0) {
|
||||
for each (var f:* in filters) {
|
||||
if (f is GlowFilter) return;
|
||||
}
|
||||
}
|
||||
filters = runFeedbackFilters().concat(filters || []);
|
||||
}
|
||||
|
||||
public function hideRunFeedback():void {
|
||||
if (filters && (filters.length > 0)) filters = [];
|
||||
if (filters && filters.length > 0) {
|
||||
var newFilters:Array = [];
|
||||
for each (var f:* in filters) {
|
||||
if (!(f is GlowFilter)) newFilters.push(f);
|
||||
}
|
||||
filters = newFilters;
|
||||
}
|
||||
}
|
||||
|
||||
private function runFeedbackFilters():Array {
|
||||
|
|
Loading…
Reference in a new issue