You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ha...@apache.org on 2018/09/03 10:51:48 UTC
[royale-asjs] branch feature/new_merge updated: Don’t set block on previously set style
This is an automated email from the ASF dual-hosted git repository.
harbs pushed a commit to branch feature/new_merge
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/feature/new_merge by this push:
new 30c9632 Don’t set block on previously set style
30c9632 is described below
commit 30c9632cbf85d255e63135dac51f003230961cf6
Author: Harbs <ha...@in-tools.com>
AuthorDate: Mon Sep 3 13:51:39 2018 +0300
Don’t set block on previously set style
---
.../src/main/royale/org/apache/royale/core/UIBase.as | 8 +++++---
.../royale/html/beads/layouts/VerticalLayout.as | 20 +++++++++++---------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
index 704cc3f..a3d3c45 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/UIBase.as
@@ -858,12 +858,14 @@ package org.apache.royale.core
COMPILE::JS
public function setDisplayStyleForLayout(value:String):void
{
+ displayStyleForLayout = value;
if (positioner.style.display !== 'none')
positioner.style.display = value;
- else
- displayStyleForLayout = value;
}
-
+ COMPILE::JS
+ public function getDisplayStyleForLayout():String{
+ return displayStyleForLayout;
+ }
[Bindable("visibleChanged")]
COMPILE::JS
public function get visible():Boolean
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalLayout.as b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalLayout.as
index c121cf4..f96b978 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/layouts/VerticalLayout.as
@@ -169,16 +169,18 @@ package org.apache.royale.html.beads.layouts
{
var child:WrappedHTMLElement = children[i] as WrappedHTMLElement;
if (child == null) continue;
- child.royale_wrapper.setDisplayStyleForLayout('block');
- if (child.style.display === 'none')
+ if(!child.royale_wrapper.getDisplayStyleForLayout())
{
- child.royale_wrapper.setDisplayStyleForLayout('block');
- }
- else
- {
- // block elements don't measure width correctly so set to inline for a second
- child.style.display = 'inline-block';
- child.style.display = 'block';
+ if (!child.royale_wrapper.visible)
+ {
+ child.royale_wrapper.setDisplayStyleForLayout('block');
+ }
+ else
+ {
+ // block elements don't measure width correctly so set to inline for a second
+ child.style.display = 'inline-block';
+ child.style.display = 'block';
+ }
}
child.royale_wrapper.dispatchEvent('sizeChanged');
}