You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2015/11/13 17:12:58 UTC
git commit: [flex-asjs] [refs/heads/core_js_to_as] - Fixed Image
component's view so that it does not report a failed image load.
Repository: flex-asjs
Updated Branches:
refs/heads/core_js_to_as 2529f4bc4 -> 0ce5c1ca7
Fixed Image component's view so that it does not report a failed image load.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/0ce5c1ca
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/0ce5c1ca
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/0ce5c1ca
Branch: refs/heads/core_js_to_as
Commit: 0ce5c1ca769e41d3895172b44e226091a1e69b3c
Parents: 2529f4b
Author: Peter Ent <pe...@apache.org>
Authored: Fri Nov 13 11:12:54 2015 -0500
Committer: Peter Ent <pe...@apache.org>
Committed: Fri Nov 13 11:12:54 2015 -0500
----------------------------------------------------------------------
.../as/src/org/apache/flex/html/beads/ImageView.as | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/0ce5c1ca/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ImageView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ImageView.as b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ImageView.as
index c2b7a58..dba31b4 100644
--- a/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ImageView.as
+++ b/frameworks/projects/HTML/as/src/org/apache/flex/html/beads/ImageView.as
@@ -90,7 +90,7 @@ package org.apache.flex.html.beads
_model = value.getBeadByType(IImageModel) as IImageModel;
_model.addEventListener("urlChanged",handleUrlChange);
- handleUrlChange(null);
+// handleUrlChange(null);
}
/**
@@ -112,12 +112,14 @@ package org.apache.flex.html.beads
}
COMPILE::JS
{
- var host:IUIBase = _strand as IUIBase;
- host.element.addEventListener('load',
- goog.bind(loadHandler, this), false);
- host.addEventListener('sizeChanged',
- goog.bind(sizeChangedHandler, this));
- (host.element as HTMLImageElement).src = _model.source;
+ if (_model.source) {
+ var host:IUIBase = _strand as IUIBase;
+ host.element.addEventListener('load',
+ goog.bind(loadHandler, this), false);
+ host.addEventListener('sizeChanged',
+ goog.bind(sizeChangedHandler, this));
+ (host.element as HTMLImageElement).src = _model.source;
+ }
}
}