-
Notifications
You must be signed in to change notification settings - Fork 27
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
Interaction of layer 'visible' flag with sublayers is unspecified #198
Comments
I remember having this conversation – is `visible` a master switch or an
override toggle?
I think we settled on "override" because everything else works that way,
though it means there's no easy way to turn an entire tree invisible at
once.
…On Wed, Mar 15, 2017 at 2:07 PM, Matt Blair ***@***.***> wrote:
https://github.com/tangrams/tangram-docs/blob/gh-pages/pages/layers.md
Example:
layers:
parent-layer:
visible: false
child-layer:
visible: true
draw:
polygons:
order: 1
color: blue
Is child-layer drawn? The current documentation is ambiguous on this, and
we've recently discovered that tangram-js and tangram-es resolve this
differently: tangrams/walkabout-style#154
<tangrams/walkabout-style#154>
cc @bcamper <https://github.com/bcamper> @nvkelso
<https://github.com/nvkelso> @meetar <https://github.com/meetar>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#198>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcEwtJ7Oq9ddB4FjcQkmqSWwTQHWPztks5rmCjMgaJpZM4MeUs_>
.
|
I wouldn't be surprised if this conversation has happened before :) As I see it, the layer |
There are cases when both would be useful in the basemap styles ;) Something to just turn a whole layer and it's children off ( |
The "cascading" visibility is already available in a way with the |
(I am admittedly prejudiced towards the "master switch" behavior because that's how it is already implemented in tangram-es). |
…You know what, I had totally conflated those two `visible` parameters.
Given that I now agree that it makes more sense that the filter-level
`visible` be a master switch – and maybe renamed? Do we have styles which
rely on it there? And yes, `enabled` would be less confusing.
…On Wed, Mar 15, 2017 at 4:15 PM, Matt Blair ***@***.***> wrote:
(I am admittedly prejudiced towards the "master switch" behavior because
that's how it is already implemented in tangram-es).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#198 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcEwo4M0FHmAl6jLqBZEhrma4B6eAgUks5rmEbXgaJpZM4MeUs_>
.
|
+1 on |
I think there's evidence now that the two parameters are easily confused, a different name would probably go a long way to prevent that. I suspect that the layer In the 250 usages of |
I've come around to the idea of a "master layer" switch both because it provides a function we don't have now (a simple way to cull whole sections of the layer tree), and also because it can provide possibly significant run-time savings by allowing the engine to stop processing layers at that point (previously JS has had to keep descending into all sub-layers in case one of them sets I get the argument for changing the property name to I would not like to have both behaviors (overridable and non-overridable) at the layer level (too much complexity); as pointed out, we still have the ability to override the That said, I notice that the demo bundled with Tangram JS makes a lot of use of layer |
I agree that if we choose a new name for this parameter then we should maintain backward compatibility with It seems that the current demo scene bundled with Tangram JS does indeed render differently in Tangram ES (we use default scene that is similar but not identical, so we wouldn't have noticed before now). |
https://github.com/tangrams/tangram-docs/blob/gh-pages/pages/layers.md
Example:
Is
child-layer
drawn? The current documentation is ambiguous on this, and we've recently discovered that tangram-js and tangram-es resolve this differently: tangrams/walkabout-style#154cc @bcamper @nvkelso @meetar
The text was updated successfully, but these errors were encountered: