Skip to content

fix: prevent stale animations from overriding update('none') - #12332

Open
sergioperezcheco wants to merge 1 commit into
chartjs:masterfrom
sergioperezcheco:fix/non-animated-update-stale-animations
Open

sergioperezcheco wants to merge 1 commit into
chartjs:masterfrom
sergioperezcheco:fix/non-animated-update-stale-animations

Conversation

@sergioperezcheco

Copy link
Copy Markdown

update('none') writes the new element positions directly, but an animation already targeting those elements can overwrite them on its next frame. This cancels the affected dataset's element and option animations before applying the non-animated update, including shared options, while leaving other datasets' animations running.

Fixes #11957. The regression tests cover line, scatter and bar charts, mixed per-dataset update modes, shared options, and an actual asynchronous render cycle. The same tests fail on unchanged production code; the focused suite, JavaScript lint, production build, API type checks and five integration projects pass locally. The full browser suite retains seven image-fixture failures reproduced on the baseline; one focused run also hit existing timing-sensitive shared-option assertions before a successful rerun. Firefox and the cross-platform CI matrix were not run locally.

Prepared and tested with Hermes Agent on behalf of Checo.

Assisted-by: Hermes Agent
Signed-off-by: sergioperezcheco <checo520@outlook.com>
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.

chart.update('none') while animations are in progress is lost

1 participant