You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that x and y are in GL coordinates, not pixel coordinates, so they're not directly comparable unless the viewport is exactly square. At a 2:1 aspect ratio, the angle at which the glyphs flip will be cut down to 22.5 degrees, which doesn't look totally broken but does look a little odd.
Unfortunately for us, our render tests for Chinese are all done on perfectly square canvases, so we didn't notice. Needs a regression test.
Porting is great for finding bugs!
The logic here tries to determine if the label has crossed a 45 degree angle by seeing if the rise is greater than the run:
https://github.com/mapbox/mapbox-gl-js/blob/master/src/symbol/projection.js#L266
The problem is that
x
andy
are in GL coordinates, not pixel coordinates, so they're not directly comparable unless the viewport is exactly square. At a 2:1 aspect ratio, the angle at which the glyphs flip will be cut down to 22.5 degrees, which doesn't look totally broken but does look a little odd.Unfortunately for us, our render tests for Chinese are all done on perfectly square canvases, so we didn't notice. Needs a regression test.
/cc @ansis @1ec5
The text was updated successfully, but these errors were encountered: