This is an automated email from the ASF dual-hosted git repository.

yishayw pushed a commit to branch color_picker
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/color_picker by this push:
     new 4b6681d  Make sure displayed color is up2date with changing model.
4b6681d is described below

commit 4b6681d198b3484d769d08e4782c818aff6c14d3
Author: DESKTOP-RH4S838\Yishay <[email protected]>
AuthorDate: Mon Apr 8 11:32:50 2019 +0300

    Make sure displayed color is up2date with changing model.
---
 .../royale/org/apache/royale/html/beads/ColorPickerView.as    | 11 +++++------
 .../royale/org/apache/royale/html/beads/models/ColorModel.as  |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ColorPickerView.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ColorPickerView.as
index e5fc67a..138691e 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ColorPickerView.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ColorPickerView.as
@@ -150,13 +150,12 @@ package org.apache.royale.html.beads
                        
                        var model:IEventDispatcher = (_strand as 
IStrandWithModel).model as IEventDispatcher;
                        (list as IColorPickerPopUp).model = model;
-                       model.addEventListener("selectedIndexChanged", 
handleItemChange);
-                       model.addEventListener("selectedItemChanged", 
handleItemChange);
+                       model.addEventListener("change", handleColorChange);
                        
                        
IEventDispatcher(_strand).addEventListener("sizeChanged", handleSizeChange);
                        
                        // set initial value and positions using default sizes
-                       itemChangeAction();
+                       colorChangeAction();
                        sizeChangeAction();
                }
                
@@ -217,16 +216,16 @@ package org.apache.royale.html.beads
                /**
                 * @private
                 */
-               protected function handleItemChange(event:Event):void
+               protected function handleColorChange(event:Event):void
                {
-                       itemChangeAction();
+                       colorChangeAction();
                }
                
                /**
                 * @private
                 * @royaleignorecoercion org.apache.royale.core.IColorModel
                 */
-               protected function itemChangeAction():void
+               protected function colorChangeAction():void
                {
                        var model:IColorModel = 
_strand.getBeadByType(IColorModel) as IColorModel;
                        COMPILE::JS 
diff --git 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/ColorModel.as
 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/ColorModel.as
index dc3969f..22b8ca5 100644
--- 
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/ColorModel.as
+++ 
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/models/ColorModel.as
@@ -52,7 +52,7 @@ package org.apache.royale.html.beads.models
                {
                }
 
-        [Bindable("colorChange")]
+        [Bindable("change")]
         /**
          *  @copy org.apache.royale.core.IColorModel#color
          *  
@@ -72,7 +72,7 @@ package org.apache.royale.html.beads.models
                public function set color(value:uint):void
                {
                        _color = value;
-                       dispatchEvent(new Event("colorChange"));
+                       dispatchEvent(new Event("change"));
                }
        }
 }

Reply via email to