From 7d8126013b7400890c2dd5d4dac14196da17f6cc Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Thu, 1 Aug 2013 19:38:34 -0700 Subject: [PATCH] Changed the ImageSOurce Loaded function to IsLoaded to correspond with the rest of the code base. #41 --- EndGate/EndGate.Core.JS/Graphics/ImageSource.js | 4 +++- EndGate/EndGate.Core.JS/Graphics/ImageSource.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EndGate/EndGate.Core.JS/Graphics/ImageSource.js b/EndGate/EndGate.Core.JS/Graphics/ImageSource.js index 167a5454..6d34b51c 100644 --- a/EndGate/EndGate.Core.JS/Graphics/ImageSource.js +++ b/EndGate/EndGate.Core.JS/Graphics/ImageSource.js @@ -40,6 +40,8 @@ var EndGate; this._size = new EndGate.Size2d(width, height); this.ClipLocation = new EndGate.Vector2d(clipX, clipY); this.ClipSize = new EndGate.Size2d(clipWidth, clipHeight); + } else { + this.ClipSize = null; } } Object.defineProperty(ImageSource.prototype, "OnLoaded", { @@ -67,7 +69,7 @@ var EndGate; /** * Determines if the ImageSource has been loaded. */ - ImageSource.prototype.Loaded = function () { + ImageSource.prototype.IsLoaded = function () { return this._loaded; }; diff --git a/EndGate/EndGate.Core.JS/Graphics/ImageSource.ts b/EndGate/EndGate.Core.JS/Graphics/ImageSource.ts index 886b4703..8519d9d7 100644 --- a/EndGate/EndGate.Core.JS/Graphics/ImageSource.ts +++ b/EndGate/EndGate.Core.JS/Graphics/ImageSource.ts @@ -77,6 +77,9 @@ module EndGate.Graphics { this.ClipLocation = new Vector2d(clipX, clipY); this.ClipSize = new Size2d(clipWidth, clipHeight); } + else { + this.ClipSize = null; // Waiting for the image source OnLoad to set it + } } /** @@ -96,7 +99,7 @@ module EndGate.Graphics { /** * Determines if the ImageSource has been loaded. */ - public Loaded(): boolean { + public IsLoaded(): boolean { return this._loaded; }