modern-canvas 0.27.17 → 0.27.19

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -5648,7 +5648,7 @@ var Yr = class extends Jr {
5648
5648
  }
5649
5649
  zoomOut() {
5650
5650
  let e = this._zoomStep(this._zoom.x), t = this._zoom.x - e;
5651
- t = Math.ceil(t / e) * e, this.setZoomAtOrigin(t, t, "screenCenter");
5651
+ t = Math.ceil(t / e - 1e-10) * e, this.setZoomAtOrigin(t, t, "screenCenter");
5652
5652
  }
5653
5653
  _input(e, t) {
5654
5654
  if (super._input(e, t), t === "keydown") {
@@ -7827,7 +7827,7 @@ var X = class extends C {
7827
7827
  if (!a || a.width <= 0 || a.height <= 0) continue;
7828
7828
  let o = i.computedStyle, s = this._getAtlasCharacterColor(i);
7829
7829
  if (!s) return !1;
7830
- let c = this._resolveThemeColor(s), l = +(o.fontStyle === "italic"), u = `${i.content}|${o.fontFamily}|${o.fontSize}|${o.fontWeight ?? 400}|${l}|${c}`, d = a.left, f = a.top, p = t.acquire(u, a.width, a.height, (e) => {
7830
+ let c = this._resolveThemeColor(s), l = +(o.fontStyle === "italic"), u = `${i.glyphFontId}|${i.content}|${o.fontFamily}|${o.fontSize}|${o.fontWeight ?? 400}|${l}|${c}`, d = a.left, f = a.top, p = t.acquire(u, a.width, a.height, (e) => {
7831
7831
  e.translate(-d, -f), i.path.drawTo(e, {
7832
7832
  fill: c,
7833
7833
  fillRule: "nonzero",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-canvas",
3
3
  "type": "module",
4
- "version": "0.27.17",
4
+ "version": "0.27.19",
5
5
  "packageManager": "pnpm@10.19.0",
6
6
  "description": "A JavaScript WebGL rendering engine. only the ESM.",
7
7
  "author": "wxm",
@@ -54,7 +54,7 @@
54
54
  "dev": "vite playground",
55
55
  "lint": "eslint src playground test",
56
56
  "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
57
- "release": "pnpm typecheck && pnpm lint && pnpm vitest run && bumpp package.json --commit \"release: v%s\" --push --all --tag",
57
+ "release": "pnpm typecheck && pnpm lint && pnpm vitest run && bumpp package.json --commit \"chore: 发布 v%s\" --push --all --tag",
58
58
  "start": "esno src/index.ts",
59
59
  "test": "vitest",
60
60
  "typecheck": "tsc --noEmit"
@@ -65,7 +65,7 @@
65
65
  "modern-font": "^0.6.3",
66
66
  "modern-idoc": "^0.12.4",
67
67
  "modern-path2d": "^1.8.8",
68
- "modern-text": "^2.2.3"
68
+ "modern-text": "^2.2.5"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "echarts": "^5 || ^6",