refactor node stateClasses and stylelist calculation
[potlatch2.git] / net / systemeD / potlatch2 / mapfeatures / editors / Choice.as
index 635c95a2625a9a7f3023a99d8f8eeb315698d197..2b390c1bbc6c900110b5e3ba91a4c5f4aa1d5ea4 100644 (file)
@@ -1,6 +1,7 @@
 package net.systemeD.potlatch2.mapfeatures.editors {
 
     import flash.events.*;
+    import flash.utils.ByteArray;
 
        public class Choice extends EventDispatcher {
 
@@ -10,8 +11,8 @@ package net.systemeD.potlatch2.mapfeatures.editors {
         public var description:String = "";
         [Bindable]
         public var value:String = null;
-        [Bindable]
-        public var icon:String = null;
+        [Bindable(event="iconLoaded")]
+        public var icon:ByteArray = null;
 
         private var _match:RegExp = null;
         
@@ -26,6 +27,11 @@ package net.systemeD.potlatch2.mapfeatures.editors {
                 _match = new RegExp("^("+matchStr+")$");
             }
         }
+        
+        public function imageLoaded(url:String, data:ByteArray):void {
+            icon = data;
+            dispatchEvent(new Event("iconLoaded"));
+        }
     }
 
 }