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

piotrz 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 e4996f763e Jewel DataGrid: Simplify style assignment
e4996f763e is described below

commit e4996f763e26eb2934892622b03ed85b95f5b2fe
Author: Piotr Zarzycki <[email protected]>
AuthorDate: Sat Jun 22 06:31:19 2024 +0200

    Jewel DataGrid: Simplify style assignment
---
 .../royale/org/apache/royale/jewel/beads/views/DataGridView.as | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
index ff1817f993..83747cbf0d 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/DataGridView.as
@@ -547,10 +547,12 @@ package org.apache.royale.jewel.beads.views
 
                      COMPILE::JS
                      {
-                        (newDataGridColumnList as 
IChild).element.style["minWidth"] = (dataGridColumnList as 
IChild).element.style["minWidth"];
-                        (newDataGridColumnList as 
IChild).element.style["maxWidth"] = (dataGridColumnList as 
IChild).element.style["maxWidth"];
-                        (newDataGridColumnList as 
IChild).element.style["width"] = (dataGridColumnList as 
IChild).element.style["width"];
-                        (newDataGridColumnList as 
IChild).element.style["flex"] = (dataGridColumnList as 
IChild).element.style["flex"];
+                        var currentStyles:Object = (dataGridColumnList as 
IChild).element.style;
+                        var newStyles:Object = (newDataGridColumnList as 
IChild).element.style;
+                        for (var style:String in currentStyles)
+                        {
+                            newStyles.setProperty(style, 
currentStyles.getPropertyValue(style));
+                        }
                      }
 
                      (_listArea as IParent).addElementAt(newDataGridColumnList 
as IChild, elementIndex);

Reply via email to