@tldraw/editor 5.5.0-canary.3870eea2f0fd → 5.5.0-canary.43e002faf22b
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 +6 -4
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +14 -6
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +3 -3
- 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 +6 -4
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +14 -6
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +3 -3
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/editor/Editor.ts +12 -6
- package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +23 -8
- 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.43e002faf22b",
|
|
396
396
|
"cjs"
|
|
397
397
|
);
|
|
398
398
|
//# sourceMappingURL=index.js.map
|
|
@@ -2498,14 +2498,16 @@ class Editor extends import_eventemitter3.default {
|
|
|
2498
2498
|
setCamera(point, opts) {
|
|
2499
2499
|
const { isLocked } = this._cameraOptions.__unsafe__getWithoutCapture();
|
|
2500
2500
|
if (isLocked && !opts?.force) return this;
|
|
2501
|
+
const _point = import_Vec.Vec.Cast(point);
|
|
2502
|
+
if (!Number.isFinite(_point.x) || !Number.isFinite(_point.y) || !Number.isFinite(_point.z)) {
|
|
2503
|
+
throw Error(
|
|
2504
|
+
`Editor.setCamera: expected finite values, got (${_point.x}, ${_point.y}, ${_point.z}).`
|
|
2505
|
+
);
|
|
2506
|
+
}
|
|
2501
2507
|
this.stopCameraAnimation();
|
|
2502
2508
|
if (this.getInstanceState().followingUserId) {
|
|
2503
2509
|
this.stopFollowingUser();
|
|
2504
2510
|
}
|
|
2505
|
-
const _point = import_Vec.Vec.Cast(point);
|
|
2506
|
-
if (!Number.isFinite(_point.x)) _point.x = 0;
|
|
2507
|
-
if (!Number.isFinite(_point.y)) _point.y = 0;
|
|
2508
|
-
if (_point.z === void 0 || !Number.isFinite(_point.z)) point.z = this.getZoomLevel();
|
|
2509
2511
|
const camera = this.getConstrainedCamera(_point, opts);
|
|
2510
2512
|
if (opts?.animation) {
|
|
2511
2513
|
const { width, height } = this.getViewportScreenBounds();
|