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

Rename layer visible -> enabled & don't allow descendant layers to override #523

Merged
merged 4 commits into from
Mar 17, 2017

Conversation

bcamper
Copy link
Member

@bcamper bcamper commented Mar 17, 2017

As discussed in tangrams/tangram-docs#198:

  • Renames the layer-level visible property to enabled, to prevent confusion with the draw group-level visible property, which continues to exist as-is.
    • Provides backwards compatibility for the previous visible property name: if the enabled parameter is undefined for a given layer, any value for visible will be used instead.
  • Changes the Tangram JS treatment of the layer enabled (nee visible) parameter to match that of Tangram ES: once set by a layer, the parameter cannot be overridden by any descendant layers.
    • This provides a mechanism to cull large portions of the layer tree, with the guarantee that they will stay hidden. This is especially useful as more optional overlay-style layers are added to the map (bike, transit, etc.), allowing the engine to efficiently cull these when they are off.
    • For cases where it's useful for sub-layers to control visibility, the draw group-level visible property continues to provide this fine-grained control; since all draw group properties are merged, and descendant layer draw groups can override any properties defined by ancestors, this behavior continues to work as-is.

@bcamper
Copy link
Member Author

bcamper commented Mar 17, 2017

@matteblair @nvkelso let's confirm this is the behavior we want? I'd like to include any such syntax changes in 0.12.0 rather than putting them off with further behavior divergence (and backwards compatibility transition period for previous visible property).

@bcamper bcamper added this to the v0.12.0 milestone Mar 17, 2017
@matteblair
Copy link
Member

👍 Looks good to me!

@bcamper
Copy link
Member Author

bcamper commented Mar 24, 2017

Released in v0.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants