Skip to content

map.setStyle retains existing classes. Fixes #911 - #916

Closed
lbud wants to merge 1 commit into
mb-pagesfrom
setStyle-retainClasses
Closed

lbud wants to merge 1 commit into
mb-pagesfrom
setStyle-retainClasses

Conversation

@lbud

@lbud lbud commented Jan 7, 2015

Copy link
Copy Markdown
Contributor

No description provided.

@jfirebaugh

Copy link
Copy Markdown
Contributor

I think if we do #911 we should make the API reflect the fact that classes are no longer tied to the style. I.e. move the class state and mutation methods (addClass, removeClass, etc) to Map and pass the class list into style.cascadeClasses.

@lbud

lbud commented Jan 7, 2015

Copy link
Copy Markdown
Contributor Author

Good point. Though I wonder if (additionally, or instead?) maybe we should also make retainClasses an optional setStyle param? Agreed that it's weird to untie classes and style while keeping the API style.addClass, but it also is a bit weird to untie classes and styles in general.

@jfirebaugh

Copy link
Copy Markdown
Contributor

Hopefully the functionality of {retainClasses: false} would be adequately covered by setStyle(...) + setClassList([]).

@jfirebaugh

Copy link
Copy Markdown
Contributor

⇢ #936

@jfirebaugh jfirebaugh closed this Jan 15, 2015
@jfirebaugh
jfirebaugh deleted the setStyle-retainClasses branch January 15, 2015 00:48
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

Successfully merging this pull request may close these issues.

2 participants