-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] make symbols fade out faster while zooming out #15416
Conversation
Zooming outcan make symbols overlap quickly. The area previously covered by the viewport is covered by a lot of colliding labels while the surrounding area has no labels. This difference produces an unwanted effect. This reduces that effect by: - reducing the fade duration while zooming out - doing placement more frequently while zooming out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes here look good. I've tested this on the macosapp with a touchpad, but would like to see confirmation of on-device improvements as well before we decide to move forward with this change.
@ansis Is there any way to test these types of changes? Given that they are dependent on system performance, I don't think a render test with a wait
will lead to reliable results. And there aren't any existing unit tests for the Placement
class.
And a linear adjustment seems to make more sense.
@pozdnyakov I think b509547 should help with this. The It would be great if someone could test on a device. Other than that, feel free to merge. |
@ansis I will check how it looks on Pixel2. Looks fine on device, pinch zoom-out is not as fast as scroll (trackpad / wheel) on desktop, thus, label clustering is almost invisible. |
@ansis looks better now, thanks! |
@ansis could you add a changelog entry in a new pr? @mapbox/maps-android @mapbox/maps-ios noting that we should definitely spend time testing this change on low-end devices with the beta goes out. |
removing changelog label, this was added in #15443 |
Zooming out can make symbols overlap quickly. After zooming out quickly the area previously covered by the viewport has a lot of colliding labels while the surrounding area has no labels. This difference produces an unwanted effect:
This reduces that effect by:
ports https://github.com/mapbox/mapbox-gl-js/pull/8628/files
In -js we're still trying to figure out whether this introduces jankiness. I've only tested this in the glfw app on -native and it seems to work as smoothly as master. Placement is faster on -native so this should be an ok change.
To test, zoom in to a dense area and then zoom out as quickly and suddenly as possible. The main thing to check is that it doesn't introduce extra jank.
@langsmith @friedbunny could you help test this on a device?