@tldraw/editor 3.10.0-canary.15f6aaa3d2d3 → 3.10.0-canary.40e471348e38
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 +5 -6
- package/dist-cjs/lib/editor/Editor.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 +0 -1
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- 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 +0 -1
- package/src/version.ts +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -80,7 +80,6 @@ var import_state = require("@tldraw/state");
|
|
|
80
80
|
var import_store = require("@tldraw/store");
|
|
81
81
|
var import_tlschema = require("@tldraw/tlschema");
|
|
82
82
|
var import_utils = require("@tldraw/utils");
|
|
83
|
-
var import_core_js = require("core-js");
|
|
84
83
|
var import_eventemitter3 = __toESM(require("eventemitter3"));
|
|
85
84
|
var import_TLEditorSnapshot = require("../config/TLEditorSnapshot");
|
|
86
85
|
var import_createTLUser = require("../config/createTLUser");
|
|
@@ -2147,9 +2146,9 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
|
|
|
2147
2146
|
this.stopFollowingUser();
|
|
2148
2147
|
}
|
|
2149
2148
|
const _point = import_Vec.Vec.Cast(point);
|
|
2150
|
-
if (!
|
|
2151
|
-
if (!
|
|
2152
|
-
if (_point.z === void 0 || !
|
|
2149
|
+
if (!Number.isFinite(_point.x)) _point.x = 0;
|
|
2150
|
+
if (!Number.isFinite(_point.y)) _point.y = 0;
|
|
2151
|
+
if (_point.z === void 0 || !Number.isFinite(_point.z)) point.z = this.getZoomLevel();
|
|
2153
2152
|
const camera = this.getConstrainedCamera(_point, opts);
|
|
2154
2153
|
if (opts?.animation) {
|
|
2155
2154
|
const { width, height } = this.getViewportScreenBounds();
|
|
@@ -5305,8 +5304,8 @@ class Editor extends (_a = import_eventemitter3.default, _getIsShapeHiddenCache_
|
|
|
5305
5304
|
resizeShape(shape, scale, opts = {}) {
|
|
5306
5305
|
const id = typeof shape === "string" ? shape : shape.id;
|
|
5307
5306
|
if (this.getIsReadonly()) return this;
|
|
5308
|
-
if (!
|
|
5309
|
-
if (!
|
|
5307
|
+
if (!Number.isFinite(scale.x)) scale = new import_Vec.Vec(1, scale.y);
|
|
5308
|
+
if (!Number.isFinite(scale.y)) scale = new import_Vec.Vec(scale.x, 1);
|
|
5310
5309
|
const initialShape = opts.initialShape ?? this.getShape(id);
|
|
5311
5310
|
if (!initialShape) return this;
|
|
5312
5311
|
const scaleOrigin = opts.scaleOrigin ?? this.getShapePageBounds(id)?.center;
|