From fe88ae53e5f87fbf36e57c66c2407d13c735dbb7 Mon Sep 17 00:00:00 2001 From: Chip Black Date: Wed, 14 Sep 2011 05:03:17 -0500 Subject: [PATCH] Fix loading for Pixelfade --- hacks/Pixelfade/Pixelfade.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hacks/Pixelfade/Pixelfade.js b/hacks/Pixelfade/Pixelfade.js index ac01af1..e819966 100644 --- a/hacks/Pixelfade/Pixelfade.js +++ b/hacks/Pixelfade/Pixelfade.js @@ -17,7 +17,6 @@ enyo.kind({ ], create: function() { this.inherited(arguments); - this.preferencesChanged(); }, rendered: function() { this.canvas = this.$.canvas.hasNode(); @@ -31,6 +30,7 @@ enyo.kind({ img.src = "hacks/Pixelfade/pixelfade" + i + ".gif"; this.faders.push(img); } + this.preferencesChanged(); }, start: function() { this.resize(window.innerWidth, window.innerHeight); @@ -54,6 +54,8 @@ enyo.kind({ this.fadeInTimer = null; }, resize: function(w, h) { + if (!this.canvas) + return; this.canvas.style.width = w + 'px'; this.canvas.style.height = h + 'px'; this.canvas.width = w; -- 2.25.1