Skip to content

Defer automargin during scroll-wheel zoom#7815

Open
keilogic wants to merge 1 commit into
plotly:masterfrom
keilogic:fix-scrollzoom-automargin-jitter
Open

Defer automargin during scroll-wheel zoom#7815
keilogic wants to merge 1 commit into
plotly:masterfrom
keilogic:fix-scrollzoom-automargin-jitter

Conversation

@keilogic
Copy link
Copy Markdown

Summary

  • defer cartesian axis automargin while scroll-wheel zoom is still debouncing
  • reuse the existing _replotting guard that pan drag already uses, then let dragTail() release it before the final relayout
  • add a Jasmine regression that verifies Plots.doAutoMargin is not called during the wheel event and is called after the debounced relayout

Why

In #6235, scroll zoom can jitter when tick-label width changes and automargin resizes the plot while the wheel interaction is still in progress. Deferring automargin until the final debounced relayout keeps the plot box stable during the scroll interaction.

Fixes #6235.

Validation

  • npx @biomejs/biome lint src/plots/cartesian/dragbox.js test/jasmine/tests/cartesian_interact_test.js
  • npm run test-jasmine -- cartesian_interact --nowatch --report-spec
    • The new should defer automargin while zooming via mouse wheel regression passed.
    • This Windows/Chrome 148 run still reports one unrelated existing tolerance failure in should compute correct multicategory tick label span during drag (436.3244 vs expected 430 ± 5.5).

Bounty note

If the $100 PayPal/Venmo offer in #6235 still applies after this is accepted/merged, PayPal is available at https://www.paypal.com/paypalme/aogkft.

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.

Jitter / stuttering while zooming around on GL scatter plot

1 participant