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

Icons jumping around #1430

Closed
nickidlugash opened this issue Aug 14, 2015 · 11 comments
Closed

Icons jumping around #1430

nickidlugash opened this issue Aug 14, 2015 · 11 comments
Labels

Comments

@nickidlugash
Copy link

sprite-jumping

@nickidlugash
Copy link
Author

This does not appear to be an issue for retina.

@nickidlugash
Copy link
Author

This does not appear to be an issue for retina.

I was wrong; it's an issue for retina, too.

@ansis
Copy link
Contributor

ansis commented Aug 28, 2015

Is the gif of one long zoom? or many short zooms?

@bhousel
Copy link
Contributor

bhousel commented Sep 8, 2015

This looks a lot like mapbox/mapbox-gl-native#2230

@nickidlugash
Copy link
Author

Is the gif of one long zoom? or many short zooms?

@ansis @bhousel Sorry, I missed this question while I was on vacation. I think it was many short zooms, but I just tested it again now and the jumping currently still happens either way.

@bhousel
Copy link
Contributor

bhousel commented Sep 8, 2015

I get this on many short zooms. It's barely noticeable on retina, but even just zooming by one click on the mousewheel, it seems like the points are placed, then the urlhash updates, and the points jump a little bit.

Maybe after zooming, it renders, then update the url hash with dropped precision, and then fires off another render again to match what the hash says.

@bhousel bhousel closed this as completed Sep 8, 2015
@bhousel bhousel reopened this Sep 8, 2015
@incanus
Copy link
Contributor

incanus commented Sep 8, 2015

Related? mapbox/mapbox-gl-native#2230

@jfirebaugh
Copy link
Contributor

This is the effect of rasterizing icons with linear interpolation while panning or zooming, and nearest neighbor when not. It's intended to keep the icons from jumping around while the animation is in progress, and make the look sharp when it is finished. Previously: #124.

@nickidlugash
Copy link
Author

@jfirebaugh thanks for the background. So does this mean there is nothing practical we can do to fix this, other than to re-implement sdfs?

@jfirebaugh
Copy link
Contributor

It's possible there's a bug with zooming, or we could tweak the behavior for zooming to make it look better.

@ansis
Copy link
Contributor

ansis commented Jan 25, 2016

I played around with several tweaks including having the delay be different whether it was a trackpad zoom or a mouse zoom but I don't think it helps overall. Increasing the delay makes really slow zooming smoother, but it makes the jump more obvious in all other cases. I think the current 200 is a good balance.

@ansis ansis closed this as completed Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants