You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2017/10/07 19:13:47 UTC
[royale-asjs] branch develop updated (c29cc78 -> 8281cd0)
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.
from c29cc78 Updated README with Quick Start link and rewrite of ‘dependencies’ bits
new 6bc3d92 Fix URLUtils
new 8281cd0 Prevent multiple listeners and remove used listeners
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/flex/org/apache/flex/core/ImageViewBase.as | 17 ++++++++++++-----
.../src/main/flex/org/apache/flex/utils/URLUtils.as | 8 ++++----
2 files changed, 16 insertions(+), 9 deletions(-)
--
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <co...@royale.apache.org>'].
[royale-asjs] 02/02: Prevent multiple listeners and remove used
listeners
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 8281cd01a84cd1c07cb5956d30cc90abfa2cf1b5
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sat Oct 7 22:13:40 2017 +0300
Prevent multiple listeners and remove used listeners
---
.../src/main/flex/org/apache/flex/core/ImageViewBase.as | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ImageViewBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ImageViewBase.as
index bfe7cf4..7059f0e 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ImageViewBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ImageViewBase.as
@@ -142,15 +142,20 @@ package org.apache.flex.core
{
return (_strand as IImage).imageElement;
}
-
+
+ COMPILE::JS
+ private var _sizeHandlerSet:Boolean;
COMPILE::JS
public function setupLoader():void
{
var host:IUIBase = _strand as IUIBase;
- imageElement.addEventListener('load',
- loadHandler, false);
- host.addEventListener('sizeChanged',
- sizeChangedHandler);
+ imageElement.addEventListener('load', loadHandler);
+ //only do this once. We don't want multiple event listeners
+ if(!_sizeHandlerSet)
+ {
+ host.addEventListener('sizeChanged', sizeChangedHandler);
+ _sizeHandlerSet = true;
+ }
}
/**
@@ -159,6 +164,7 @@ package org.apache.flex.core
COMPILE::SWF
private function onComplete(event:Object):void
{
+ loader.contentLoaderInfo.removeEventListener("complete",onComplete);
var host:ILayoutChild = ILayoutChild(_strand);
var hostSprite:Sprite = (host as IRenderedObject).$displayObject as Sprite;
@@ -208,6 +214,7 @@ package org.apache.flex.core
COMPILE::JS
protected function loadHandler(event:Object):void
{
+ imageElement.removeEventListener('load', loadHandler);
var host:IUIBase = _strand as IUIBase;
host.dispatchEvent(new Event("layoutNeeded"));
}
--
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <co...@royale.apache.org>.
[royale-asjs] 01/02: Fix URLUtils
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 6bc3d929a2d205753b027f579e9ec410fd647749
Author: Harbs <ha...@in-tools.com>
AuthorDate: Sat Oct 7 22:12:22 2017 +0300
Fix URLUtils
---
.../projects/Core/src/main/flex/org/apache/flex/utils/URLUtils.as | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/URLUtils.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/URLUtils.as
index 9989fc4..4221788 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/URLUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/URLUtils.as
@@ -45,8 +45,8 @@ package org.apache.flex.utils
win = win || window;
if(win["URL"])
return win["URL"].createObjectURL(blobOrFile);
- if(win.webkitURL)
- return win.webkitURL.createObjectURL(blobOrFile);
+ else if(win["webkitURL"])
+ return win["webkitURL"].createObjectURL(blobOrFile);
return "";
}
@@ -56,8 +56,8 @@ package org.apache.flex.utils
win = win || window;
if(win["URL"])
win["URL"].revokeObjectURL(objectURL);
- if(win.webkitURL)
- win.webkitURL.revokeObjectURL(objectURL);
+ else if(win["webkitURL"])
+ win["webkitURL"].revokeObjectURL(objectURL);
}
public static function getFullPath(host:Object, url:String):String
--
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <co...@royale.apache.org>.