-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
only align raster sources to pixel grid when map is idle to prevent shaking #7426
Conversation
In addition to only aligning when the map is moving should we only align the raster matrix when at integer zooms and quarter rotations? |
@ansis |
29f9ffc
to
3bbdf03
Compare
I can't reproduce this on FF with my trackpad (raster layer always returns to render an |
202734c
to
849be43
Compare
@mollymerp: Yes, I'm using a physical mouse. This issue only manifests itself when the browser window has a pixel width that is odd. It's also not happening on every pan, but frequently enough to see it at least once among 10 pans. |
849be43
to
5d402f7
Compare
@kkaefer @ChrisLoer can one of you take another look here? |
5d402f7
to
4806016
Compare
…haking (#7426) * only align raster sources to pixel grid when map is idle to prevent shaking * remove integer zoom condition per kk's comment * ensure map renders once more on moveend
* publisher-production: (115 commits) fix inter-documentation link (#7791) [docs] use docs subdomain in examples (#7789) Bump Publisher First shot at new-domain staging [docs] Update page shell (#7760) updates API docs links to new url structure (#7757) add mapbox-gl-utils to plugins (#7752) [docs] Use docs-page-shell (#7742) Fixes bugs in documentation (#7741) Add worldviews example (#7720) Update compatibility matrix for `fill-extrusion-vertical-gradient` for ios & macos. (#7712) updates mapbox-gl-directions version in example (#7719) v0.52.0 cherry-pick color state fix to release branch (#7715) Update location of drone video used in examples. v0.52.0-beta.2 Cache hillshade textures based on texture size, not tile size. (#7695) avoid incomplete webp support in Edge 18 (#7687) (#7692) only align raster sources to pixel grid when map is idle to prevent shaking (#7426) (#7694) Flattens nested single element all expressions when converting to expressions (#7679) ...
* publisher-production: (115 commits) fix inter-documentation link (#7791) [docs] use docs subdomain in examples (#7789) Bump Publisher First shot at new-domain staging [docs] Update page shell (#7760) updates API docs links to new url structure (#7757) add mapbox-gl-utils to plugins (#7752) [docs] Use docs-page-shell (#7742) Fixes bugs in documentation (#7741) Add worldviews example (#7720) Update compatibility matrix for `fill-extrusion-vertical-gradient` for ios & macos. (#7712) updates mapbox-gl-directions version in example (#7719) v0.52.0 cherry-pick color state fix to release branch (#7715) Update location of drone video used in examples. v0.52.0-beta.2 Cache hillshade textures based on texture size, not tile size. (#7695) avoid incomplete webp support in Edge 18 (#7687) (#7692) only align raster sources to pixel grid when map is idle to prevent shaking (#7426) (#7694) Flattens nested single element all expressions when converting to expressions (#7679) ...
* initial layout * clean up style spec layout * clean up examples page * fix links in style spec toc * split style spec * add examples landing page * update plugins page layout * format roadmap page * fix icon positioning * delete generated bench files * address @mollymerp's feedback * update dr ui version * clean up console errors * refactor page shell * use docs-page-shell; update dr-ui and assembly; remove ProductDropdown * fix spacing; add borderRadius * various spacing, sizing * remove additional space between h2 h3 siblings * runs eslint --fix on component files * remove unused lines; linting fixes * navigation style updates: make link `link--gray` indent nested items * add spacing to code blocks * remove `color-gray` from non link elements * api item + member styling * remove base classes from /plugins; fix heading spacing * use mr-ui copy-button in copyable.js * run eslint --fix on docs/pages, docs/util * linter fixes * heading spacing for mobile * rework copyable to use codesnippet * add hover class to simple-map card * make examples header consistent with other headers * turn off h2 borders for the api section as they clash with the instance members toggle sections; max height and pretty scroll for code examples * remove unused css * adds hover state * replace color-gray-light with color-gray; it's too light on white backgrounds * remove padding conditional * rm unused file * break style-spec into components * make tocnote link--gray * adds back top padding to ApiItemMember * set borderRadius on table rows * readjust border on ApiItemMember * adds txt-break-word to overflowing code blocks * adds style spec to header * light header adjustments * style error note * Merge branch 'publisher-production' into docs-redesign * publisher-production: (115 commits) fix inter-documentation link (#7791) [docs] use docs subdomain in examples (#7789) Bump Publisher First shot at new-domain staging [docs] Update page shell (#7760) updates API docs links to new url structure (#7757) add mapbox-gl-utils to plugins (#7752) [docs] Use docs-page-shell (#7742) Fixes bugs in documentation (#7741) Add worldviews example (#7720) Update compatibility matrix for `fill-extrusion-vertical-gradient` for ios & macos. (#7712) updates mapbox-gl-directions version in example (#7719) v0.52.0 cherry-pick color state fix to release branch (#7715) Update location of drone video used in examples. v0.52.0-beta.2 Cache hillshade textures based on texture size, not tile size. (#7695) avoid incomplete webp support in Edge 18 (#7687) (#7692) only align raster sources to pixel grid when map is idle to prevent shaking (#7426) (#7694) Flattens nested single element all expressions when converting to expressions (#7679) ... * update batfish, react, and react-dom * rm unused module * update mr-ui and github-slugger * adds version var to OverviewHeader * mb-pages -> publisher-production * fix bool on iframe * clean up page shell to fix build errors * update/add pathname; add descriptions * make toggles buttons for acessbility; increase hit box; make icon larger; do not change location on click * use push state to change hash on click, but not to move page * update dr-ui * adds interactiveClass and sideBarColSize * smaller sidebar on spec * adds addtional padding to h3s on api page to clear the sticker * make hit box larger for nav items on sidebard * adjust topbarstick columns when `sidebarColSize` is set * adds make-table-scroll plugin; make non markdown table scroll * remove extra docs-content ids * make table scroll; wrap code * reorder tabs * adds back to top button long pages * update dr-ui * sets unStickWidth on TopbarSticker * Update batfish.config.js * Update yarn.lock * adds unit tests for examples * fix tests * add missing images * adds test to make sure every example as a thumbnail image * compress images * resize thumbnail images to 1200 x 500 * compress again * add a little wiggle room for image size * updates documentation for tags and adds information about example thumbnail images
…haking (mapbox#7426) * only align raster sources to pixel grid when map is idle to prevent shaking * remove integer zoom condition per kk's comment * ensure map renders once more on moveend
…haking (mapbox#7426) * only align raster sources to pixel grid when map is idle to prevent shaking * remove integer zoom condition per kk's comment * ensure map renders once more on moveend
fix #6150
one note:removed this change for a separate PRmap.isZooming()
was never returning true inside themap._render()
function when using theScrollZoomHandler
because that handler returns toactive: false
before render is called, whereaszoomend
is on a timeout so it is only called once if many scroll frames are triggered in succession. I mutated themap._zooming
state to account for that, but I'm open to other ideas on how to handle it.Any ideas on how to test this? 💭
Launch Checklist
document any changes to public APIspost benchmark scorestagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes