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

Fix regression after #5661 #5716

Closed
wants to merge 3 commits into from
Closed

Fix regression after #5661 #5716

wants to merge 3 commits into from

Conversation

iDm1
Copy link

@iDm1 iDm1 commented Aug 15, 2017

No description provided.

Copy link
Member

@perliedman perliedman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I added a comment about a gotcha that wasn't introduced here, but best to fix it while we're working with this code anyway.

Looking closer at this - I don't think setting className will work here. vid is a DOM element, and its class should be set by using DomUtil's addClass to ensure full browser compatibility.

vid.class = vid.class || '';
vid.class += 'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : '');
vid.className = vid.className || '';
vid.className += 'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems we would also need to have a space inserted here, changing the line to:

vid.className += ' leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : '');

Otherwise, if className is specified, it will be concatenated with leaflet-image-layer, a class which most certainly will not exist.

@mourner
Copy link
Member

mourner commented Aug 28, 2017

Thanks a lot for the PR! Somehow I saw this one after merging #5731 which does exactly the same change, sorry for that :(

@mourner mourner closed this Aug 28, 2017
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.

3 participants