@meta2d/core 1.1.19 → 1.1.21
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/package.json +1 -1
- package/src/canvas/canvas.js +14 -12
- package/src/canvas/canvas.js.map +1 -1
- package/src/core.d.ts +3 -3
- package/src/core.js +47 -5
- package/src/core.js.map +1 -1
- package/src/diagrams/htmlDom.d.ts +12 -0
- package/src/diagrams/htmlDom.js +66 -0
- package/src/diagrams/htmlDom.js.map +1 -0
- package/src/diagrams/index.d.ts +3 -0
- package/src/diagrams/index.js +3 -0
- package/src/diagrams/index.js.map +1 -1
- package/src/diagrams/line/dirMarkers.js +9 -5
- package/src/diagrams/line/dirMarkers.js.map +1 -1
- package/src/options.d.ts +1 -0
- package/src/options.js.map +1 -1
- package/src/pen/model.d.ts +1 -0
- package/src/pen/model.js +1 -0
- package/src/pen/model.js.map +1 -1
- package/src/pen/render.js +134 -40
- package/src/pen/render.js.map +1 -1
- package/src/store/store.d.ts +2 -0
- package/src/store/store.js.map +1 -1
package/package.json
CHANGED
package/src/canvas/canvas.js
CHANGED
|
@@ -4368,20 +4368,22 @@ export class Canvas {
|
|
|
4368
4368
|
if (!this.patchFlags) {
|
|
4369
4369
|
return;
|
|
4370
4370
|
}
|
|
4371
|
-
if (
|
|
4372
|
-
if (
|
|
4373
|
-
this.store.options.interval
|
|
4374
|
-
|
|
4371
|
+
if (patchFlags != null) {
|
|
4372
|
+
if (now - this.lastRender < this.store.options.interval) {
|
|
4373
|
+
if (this.store.options.interval > this.store.options.minFPSNumber && this.store.options.autoFPS) {
|
|
4374
|
+
this.store.options.interval--;
|
|
4375
|
+
this.store.options.animateInterval = this.store.options.interval;
|
|
4376
|
+
}
|
|
4377
|
+
if (this.renderTimer) {
|
|
4378
|
+
cancelAnimationFrame(this.renderTimer);
|
|
4379
|
+
}
|
|
4380
|
+
this.renderTimer = requestAnimationFrame(this.render);
|
|
4381
|
+
return;
|
|
4375
4382
|
}
|
|
4376
|
-
if (this.
|
|
4377
|
-
|
|
4383
|
+
else if (now - this.lastRender - this.store.options.interval > 10 && this.store.options.autoFPS && document.visibilityState === 'visible') {
|
|
4384
|
+
this.store.options.interval++;
|
|
4385
|
+
this.store.options.animateInterval = this.store.options.interval;
|
|
4378
4386
|
}
|
|
4379
|
-
this.renderTimer = requestAnimationFrame(this.render);
|
|
4380
|
-
return;
|
|
4381
|
-
}
|
|
4382
|
-
else if (now - this.lastRender - this.store.options.interval > 10 && this.store.options.autoFPS && document.visibilityState === 'visible') {
|
|
4383
|
-
this.store.options.interval++;
|
|
4384
|
-
this.store.options.animateInterval = this.store.options.interval;
|
|
4385
4387
|
}
|
|
4386
4388
|
this.renderTimer = undefined;
|
|
4387
4389
|
this.lastRender = now;
|