@opendata-ai/openchart-vanilla 2.8.1 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/graph/zoom.ts +4 -3
package/dist/index.js
CHANGED
|
@@ -665,9 +665,8 @@ var ZoomTransform = class _ZoomTransform {
|
|
|
665
665
|
const availH = canvasH - padding * 2;
|
|
666
666
|
const k = Math.min(availW / graphW, availH / graphH);
|
|
667
667
|
const cx = (minX + maxX) / 2;
|
|
668
|
-
const cy = (minY + maxY) / 2;
|
|
669
668
|
const tx = canvasW / 2 - cx * k;
|
|
670
|
-
const ty =
|
|
669
|
+
const ty = padding - minY * k;
|
|
671
670
|
return new _ZoomTransform(tx, ty, k);
|
|
672
671
|
}
|
|
673
672
|
/** Identity transform (no pan, no zoom). */
|