Use of z-layer to display/hide widgets examples

Hello,

The attached file contains two small examples.

Enjoy.

test z-index V1.json (7.5 KB)

2 Likes

exactly what i was searching for, thank you :wink:

The example seems to be broken in O-S-C version 1.x:

The following CSS code triggers an error message : “error at line 0: ReferenceError: values is not defined”.

#{
values = [9,11];
tralala = @{control};
selector = values[tralala];
}

:host{
z-index:#{selector};
}

Yes, that’s expected, you can’t use #{} like this anymore. In v1 it would look like this

JS{{
locals.values = [9,11];
locals.tralala = @{control};
locals.selector = values[locals.tralala];
}}

:host{
z-index:#{locals.selector};
}
1 Like

Shouldn’t it be modified like this?

JS{{
locals.values = [9,11];
locals.tralala = @{control};
locals.selector = values[locals.tralala];
}}

:host{
z-index:#{locals.selector};
}

Yes my mistake.

1 Like