]> git.ipfire.org Git - thirdparty/Chart.js.git/commit
fix: avoid resize loop when browser zoom is set to 90% (#10971)
authorGuy B <baronguy@gmail.com>
Sat, 17 Dec 2022 14:41:21 +0000 (09:41 -0500)
committerGitHub <noreply@github.com>
Sat, 17 Dec 2022 14:41:21 +0000 (09:41 -0500)
commit9306d7fd49338f50e87f98e732b11a236ae31fd1
tree9894368c434e69ef5102a6d0b0055c54b1ebf8d5
parent64a027874c607e33cbddc42a98ccf2293faac7d7
fix: avoid resize loop when browser zoom is set to 90% (#10971)

* test: new test to reproduce issue #10951

* test:  validate the canvas style too

* fix: Avoid reassigning the the chart size. For specific values of pixelRatio the assignment would cause the size to reduce by 1px. Since it's called from the ResizeObserver it will be stuck in a loop that constantly reduce the size of the chart and canvas.

* Revert "fix: Avoid reassigning the the chart size. For specific values of pixelRatio the assignment would cause the size to reduce by 1px. Since it's called from the ResizeObserver it will be stuck in a loop that constantly reduce the size of the chart and canvas."

This reverts commit ed7a34814dd01f57eabc2379fc7187b9a41c8732.

* fix: Avoid the resize loop by fixing the rounding error in the retinaScale function.

* fix: getMaximumSize was flooring non-integer height values unnecessarily.

* Revert "fix: Avoid the resize loop by fixing the rounding error in the retinaScale function."

This reverts commit 23525abc6aadc9880f841ff58dbd4a4ea0b14e88.

* fix: Avoid the resize loop by fixing the rounding error in the retinaScale function.
src/helpers/helpers.dom.ts
test/specs/helpers.dom.tests.js