@tldraw/editor 5.5.0-canary.e53ac62df254 → 5.5.0-canary.e7e4b3c8d9b7
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-cjs/index.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +7 -3
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/utils/deepLinks.js +2 -1
- package/dist-cjs/lib/utils/deepLinks.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +7 -3
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/utils/deepLinks.mjs +2 -1
- package/dist-esm/lib/utils/deepLinks.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +9 -1
- package/package.json +7 -7
- package/src/lib/editor/Editor.ts +9 -2
- package/src/lib/utils/deepLinks.test.ts +15 -0
- package/src/lib/utils/deepLinks.ts +8 -3
- package/src/version.ts +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -392,7 +392,7 @@ var import_uniq = require("./lib/utils/uniq");
|
|
|
392
392
|
var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
|
|
393
393
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
394
394
|
"@tldraw/editor",
|
|
395
|
-
"5.5.0-canary.
|
|
395
|
+
"5.5.0-canary.e7e4b3c8d9b7",
|
|
396
396
|
"cjs"
|
|
397
397
|
);
|
|
398
398
|
//# sourceMappingURL=index.js.map
|
|
@@ -2801,11 +2801,14 @@ class Editor extends import_eventemitter3.default {
|
|
|
2801
2801
|
_animateViewport(ms) {
|
|
2802
2802
|
if (!this._viewportAnimation) return;
|
|
2803
2803
|
this._viewportAnimation.elapsed += ms;
|
|
2804
|
-
const { elapsed, easing, duration, start, end } = this._viewportAnimation;
|
|
2804
|
+
const { elapsed, easing, duration, start, end, opts } = this._viewportAnimation;
|
|
2805
2805
|
if (elapsed > duration) {
|
|
2806
2806
|
this.off("tick", this._animateViewport);
|
|
2807
2807
|
this._viewportAnimation = null;
|
|
2808
|
-
this._setCamera(
|
|
2808
|
+
this._setCamera(
|
|
2809
|
+
new import_Vec.Vec(-end.x, -end.y, this.getViewportScreenBounds().width / end.width),
|
|
2810
|
+
opts
|
|
2811
|
+
);
|
|
2809
2812
|
return;
|
|
2810
2813
|
}
|
|
2811
2814
|
const remaining = duration - elapsed;
|
|
@@ -2843,7 +2846,8 @@ class Editor extends import_eventemitter3.default {
|
|
|
2843
2846
|
duration: duration / animationSpeed,
|
|
2844
2847
|
easing,
|
|
2845
2848
|
start: viewportPageBounds.clone(),
|
|
2846
|
-
end: targetViewportPage.clone()
|
|
2849
|
+
end: targetViewportPage.clone(),
|
|
2850
|
+
opts: rest
|
|
2847
2851
|
};
|
|
2848
2852
|
this.once("stop-camera-animation", () => {
|
|
2849
2853
|
this.off("tick", this._animateViewport);
|