Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinearLayout zIndex behaviour in browser and native #11

Open
roosmaa opened this issue Jul 23, 2013 · 1 comment
Open

LinearLayout zIndex behaviour in browser and native #11

roosmaa opened this issue Jul 23, 2013 · 1 comment

Comments

@roosmaa
Copy link

roosmaa commented Jul 23, 2013

It seems that zIndex ordering of linear layout children is ignored (instead the order of adding the subview is used) when building for native.

For example:

import ui.View;

exports = Class(GC.Application, function () {

    this.initUI = function () {
        var cont = new ui.View({
            superview: this.view,
            layout: "linear",
            direction: "vertical"
        });

        new ui.View({
            superview: cont,
            height: 50,
            width: 50,
            backgroundColor: "green",
            zIndex: 3
        });

        new ui.View({
            superview: cont,
            height: 50,
            width: 50,
            backgroundColor: "yellow",
            zIndex: 2
        });

        new ui.View({
            superview: cont,
            height: 50,
            width: 50,
            backgroundColor: "red",
            zIndex: 1
        });
    };

    this.launchUI = function () {};
});

This code displays traffic lights in browser (red, yellow, green), however, on native it is flipped (green, yellow, red).

@bubbleboy14
Copy link
Contributor

Hello roosmaa. Thanks for the detailed bug report and test case. Great catch. We'll see what we can do about this. Thanks again for all your hard work. We really appreciate it.

ArnoVanDerVegt added a commit that referenced this issue Sep 13, 2013
Regex to test for valid shortNames
rampr referenced this issue in hashcube/timestep Jun 24, 2014
rampr referenced this issue in hashcube/timestep Jun 24, 2014
jishnu7 referenced this issue in hashcube/timestep May 30, 2016
#11)

reset superview property of view on removeFromSuperview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants