You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/07/28 20:40:32 UTC

[06/36] git commit: [flex-asjs] [refs/heads/develop] - dispatch an event so fontloaders know when to act

dispatch an event so fontloaders know when to act


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/a3486416
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/a3486416
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/a3486416

Branch: refs/heads/develop
Commit: a3486416efebc0deee59c2ad4205f85d69b9e36e
Parents: c9c90ff
Author: Alex Harui <ah...@apache.org>
Authored: Mon Jul 13 21:55:24 2015 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Jul 13 21:55:24 2015 -0700

----------------------------------------------------------------------
 .../Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/a3486416/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
index 57d6726..176b112 100644
--- a/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
+++ b/frameworks/projects/Core/as/src/org/apache/flex/core/SimpleCSSValuesImpl.as
@@ -25,6 +25,7 @@ package org.apache.flex.core
 	
 	import org.apache.flex.events.EventDispatcher;
 	import org.apache.flex.events.ValueChangeEvent;
+    import org.apache.flex.events.ValueEvent;
     import org.apache.flex.utils.CSSUtils;
     
     /**
@@ -83,6 +84,9 @@ package org.apache.flex.core
 			}
 			c = mainClass.constructor as Class;
             generateCSSStyleDeclarations(c["factoryFunctions"], c["data"]);
+            if (hasEventListener("init"))
+                dispatchEvent(new ValueEvent("init", false, false, c["fontFaces"]));
+            
             var i:int = 1;
             while (true)
             {
@@ -91,6 +95,8 @@ package org.apache.flex.core
                 if (ff == null)
                     break;
                 generateCSSStyleDeclarations(c[ffName], c["data" + i.toString()]);
+                if (hasEventListener("init"))
+                    dispatchEvent(new ValueEvent("init", false, false, c["fontFaces" + i.toString()]));
                 i++;
             }
         }