Skip to content

Commit

Permalink
Fixes few defects in examples at mozilla#135
Browse files Browse the repository at this point in the history
  • Loading branch information
yurydelendik committed May 16, 2013
1 parent f3276d2 commit a035873
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/flash/events/EventDispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var EventDispatcherDefinition = (function () {

evt._currentTarget = evt._target;

var queue = this.queue;
var queue = this.queue.slice(0); // can be modified
for (var i = 0, n = queue.length; i < n; i++) {
var entry = queue[i];
entry.listener(evt);
Expand Down
5 changes: 4 additions & 1 deletion src/swf/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function renderStage(stage, ctx, onBeforeFrame, onAfterFrame) {

for (var i = 0, n = children.length; i < n; i++) {
var child = children[i];
if (child && child._visible) {
if (child && (child._visible || visitor.ignoreVisibleAttribute)) {
var isContainer = ContainerClass.isInstanceOf(child) ||
SimpleButtonClass.isInstanceOf(child);

Expand All @@ -202,6 +202,7 @@ function renderStage(stage, ctx, onBeforeFrame, onAfterFrame) {
this.ctx = ctx;
}
PreVisitor.prototype = {
ignoreVisibleAttribute: true,
childrenStart: function() {},
childrenEnd: function() {},
visit: function (child, isContainer) {
Expand Down Expand Up @@ -234,6 +235,7 @@ function renderStage(stage, ctx, onBeforeFrame, onAfterFrame) {
}
}
MouseVisitor.prototype = {
ignoreVisibleAttribute: false,
childrenStart: function() {},
childrenEnd: function(container) {
this.interactiveParent = this.parentsStack.pop();
Expand Down Expand Up @@ -336,6 +338,7 @@ function renderStage(stage, ctx, onBeforeFrame, onAfterFrame) {
this.clipStack = null;
}
RenderVisitor.prototype = {
ignoreVisibleAttribute: false,
childrenStart: function(parent) {
if (this.depth == 0) {
var ctx = this.ctx;
Expand Down
6 changes: 3 additions & 3 deletions src/swf/shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function morph(start, end) {
}
function morphColor(color, colorMorph) {
return '"rgba(" + (' +
morph(color.red, colorMorph.red) + ') + "," + (' +
morph(color.green, colorMorph.green) + ') + "," + (' +
morph(color.blue, colorMorph.blue) + ') + "," + (' +
morph(color.red, colorMorph.red) + '|0) + "," + (' +
morph(color.green, colorMorph.green) + '|0) + "," + (' +
morph(color.blue, colorMorph.blue) + '|0) + "," + (' +
morph(color.alpha / 255, colorMorph.alpha / 255) +
') + ")"';
}
Expand Down

0 comments on commit a035873

Please sign in to comment.