Skip to content

Conversation

jieter
Copy link
Contributor

@jieter jieter commented Jul 5, 2012

When inspecting the DOM in Chrome I noticed spaces being added to the class attribute of the leaflet-map-pane-div. The regexp to remove spaces after removing a class in removeClass only removed spaces in the head, added a second case to the regexp to remove spaces at the tail.

Also use DomUtil.addClass in Map.ZoomAnimations.js instead of manual class manipulation. When writing this comment, I just grepped for "className +=" and found quite some (19) other occurrences... If you like, I can change them too.

@mourner
Copy link
Member

mourner commented Jul 5, 2012

You're right! I was going to do that too (did the same recently for className.replace when removing) but didn't get to it yet. :)

mourner added a commit that referenced this pull request Jul 5, 2012
DomUtil removeClass space handling.
@mourner mourner merged commit c3573db into Leaflet:master Jul 5, 2012
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