You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2021/12/16 06:35:38 UTC
[royale-asjs] branch develop updated: Prevent VRule from obliterating previously set styles (e.g. via mxml attributes)
This is an automated email from the ASF dual-hosted git repository.
gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new a22f49a Prevent VRule from obliterating previously set styles (e.g. via mxml attributes)
a22f49a is described below
commit a22f49aa3cab0b1d8c81d78bec15dcc70585d520
Author: greg-dove <gr...@gmail.com>
AuthorDate: Thu Dec 16 19:35:29 2021 +1300
Prevent VRule from obliterating previously set styles (e.g. via mxml attributes)
---
.../projects/MXRoyale/src/main/royale/mx/controls/VRule.as | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/VRule.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/VRule.as
index bf31013..4ac5b6f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/VRule.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/VRule.as
@@ -23,7 +23,7 @@ package mx.controls
/* import flash.display.Graphics;*/
import mx.core.UIComponent;
-import org.apache.royale.core.SimpleCSSStyles;
+import org.apache.royale.core.SimpleCSSStyles;
//--------------------------------------
// Styles
@@ -199,7 +199,13 @@ public class VRule extends UIComponent
"borderLeftStyle" : "solid",
"borderLeftColor" : "#000"
}
- style = values;
+ var currentStyle:Object = style;
+ if (currentStyle) {
+ for (var field:String in values) {
+ currentStyle[field] = values[field];
+ }
+ } else currentStyle = values;
+ style = currentStyle;
super.addedToParent();
}
//--------------------------------------------------------------------------