Hi Piotr,

this seems not a proper fix for me. Why Simple*** should be responsible of
removing selectors of BasicLayout?, and what if instead of the current
classes will be others with other selectors?

The fix should be something where a bead setup its own selectors when added
and responsible to remove it when removed or not used.

If not the solution is not generalist and we'll end adding many remove
lines for all the possible layouts that could be involved, what seems very
bad solution, don't you think?



El sáb., 26 ene. 2019 a las 13:36, <[email protected]> escribió:

> 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 17bfa8b  Jewel Group: Fix dynamic adding Horizontal/Vertical
> layout
> 17bfa8b is described below
>
> commit 17bfa8b1b98c4c57d2961ee3f183aa1b6d0139ff
> Author: Piotr Zarzycki <[email protected]>
> AuthorDate: Sat Jan 26 13:35:48 2019 +0100
>
>     Jewel Group: Fix dynamic adding Horizontal/Vertical layout
> ---
>  .../royale/jewel/beads/layouts/SimpleHorizontalLayout.as   | 14
> ++++++++++++--
>  .../royale/jewel/beads/layouts/SimpleVerticalLayout.as     | 14
> ++++++++++++--
>  2 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleHorizontalLayout.as
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleHorizontalLayout.as
> index 3ec3ce5..b8a7d7f 100644
> ---
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleHorizontalLayout.as
> +++
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleHorizontalLayout.as
> @@ -79,11 +79,21 @@ package org.apache.royale.jewel.beads.layouts
>                         COMPILE::JS
>                         {
>                                 if (hostClassList.contains("layout"))
> -                                       hostClassList.remove("layout");
> +                {
> +                    hostClassList.remove("layout");
> +                }
>                                 hostClassList.add("layout");
> +
>                                 if(hostClassList.contains("horizontal"))
> -                                       hostClassList.remove("horizontal");
> +                {
> +                    hostClassList.remove("horizontal");
> +                }
>                                 hostClassList.add("horizontal");
> +
> +                if(hostClassList.contains("basic"))
> +                {
> +                    hostClassList.remove("basic");
> +                }
>                         }
>                 }
>
> diff --git
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleVerticalLayout.as
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleVerticalLayout.as
> index 938cc6b..e97db0c 100644
> ---
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleVerticalLayout.as
> +++
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/SimpleVerticalLayout.as
> @@ -80,11 +80,21 @@ package org.apache.royale.jewel.beads.layouts
>                         COMPILE::JS
>                         {
>                                 if (hostClassList.contains("layout"))
> -                                       hostClassList.remove("layout");
> +                {
> +                    hostClassList.remove("layout");
> +                }
>                                 hostClassList.add("layout");
> +
>                                 if(hostClassList.contains("vertical"))
> -                                       hostClassList.remove("vertical");
> +                {
> +                    hostClassList.remove("vertical");
> +                }
>                                 hostClassList.add("vertical");
> +
> +                               if(hostClassList.contains("basic"))
> +                               {
> +                    hostClassList.remove("basic");
> +                               }
>                         }
>                 }
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to