@tldraw/editor 5.3.0-canary.3c03dcdf8fa0 → 5.3.0-canary.58df715967e7
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.d.ts +0 -6
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/editor/Editor.js +1 -24
- 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.d.mts +0 -6
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/editor/Editor.mjs +1 -24
- 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 +4 -30
- package/src/version.ts +3 -3
package/dist-cjs/index.d.ts
CHANGED
|
@@ -1220,12 +1220,6 @@ export declare class Editor extends EventEmitter<TLEventMap> {
|
|
|
1220
1220
|
* @public
|
|
1221
1221
|
*/
|
|
1222
1222
|
isDisposed: boolean;
|
|
1223
|
-
/**
|
|
1224
|
-
* Whether the editor is mounted.
|
|
1225
|
-
*
|
|
1226
|
-
* @public
|
|
1227
|
-
*/
|
|
1228
|
-
isMounted: boolean;
|
|
1229
1223
|
/* Excluded from this release type: _tickManager */
|
|
1230
1224
|
/**
|
|
1231
1225
|
* A manager for the editor's input state.
|
package/dist-cjs/index.js
CHANGED
|
@@ -379,7 +379,7 @@ var import_uniq = require("./lib/utils/uniq");
|
|
|
379
379
|
var import_defaultThemes2 = require("./lib/editor/managers/ThemeManager/defaultThemes");
|
|
380
380
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
381
381
|
"@tldraw/editor",
|
|
382
|
-
"5.3.0-canary.
|
|
382
|
+
"5.3.0-canary.58df715967e7",
|
|
383
383
|
"cjs"
|
|
384
384
|
);
|
|
385
385
|
//# sourceMappingURL=index.js.map
|
|
@@ -564,9 +564,6 @@ class Editor extends import_eventemitter3.default {
|
|
|
564
564
|
this.stopFollowingUser();
|
|
565
565
|
}
|
|
566
566
|
this.on("tick", this._flushEventsForTick);
|
|
567
|
-
this.once("mount", () => {
|
|
568
|
-
this.isMounted = true;
|
|
569
|
-
});
|
|
570
567
|
this.timers.requestAnimationFrame(() => {
|
|
571
568
|
this._tickManager.start();
|
|
572
569
|
});
|
|
@@ -661,12 +658,6 @@ class Editor extends import_eventemitter3.default {
|
|
|
661
658
|
* @public
|
|
662
659
|
*/
|
|
663
660
|
isDisposed = false;
|
|
664
|
-
/**
|
|
665
|
-
* Whether the editor is mounted.
|
|
666
|
-
*
|
|
667
|
-
* @public
|
|
668
|
-
*/
|
|
669
|
-
isMounted = false;
|
|
670
661
|
/**
|
|
671
662
|
* A manager for the editor's tick events.
|
|
672
663
|
*
|
|
@@ -4243,21 +4234,7 @@ class Editor extends import_eventemitter3.default {
|
|
|
4243
4234
|
*/
|
|
4244
4235
|
getSelectedShapeAtPoint(point) {
|
|
4245
4236
|
const selectedShapeIds = this.getSelectedShapeIds();
|
|
4246
|
-
|
|
4247
|
-
const sortedShapes = this.getCurrentPageShapesSorted();
|
|
4248
|
-
for (let i = sortedShapes.length - 1; i >= 0; i--) {
|
|
4249
|
-
const shape = sortedShapes[i];
|
|
4250
|
-
if (shape.type === "group") continue;
|
|
4251
|
-
if (!selectedShapeIds.includes(shape.id)) continue;
|
|
4252
|
-
if (this.getShapeGeometry(shape).hitTestPoint(
|
|
4253
|
-
this.getPointInShapeSpace(shape, point),
|
|
4254
|
-
margin,
|
|
4255
|
-
true
|
|
4256
|
-
)) {
|
|
4257
|
-
return shape;
|
|
4258
|
-
}
|
|
4259
|
-
}
|
|
4260
|
-
return void 0;
|
|
4237
|
+
return this.getCurrentPageShapesSorted().filter((shape) => shape.type !== "group" && selectedShapeIds.includes(shape.id)).reverse().find((shape) => this.isPointInShape(shape, point, { hitInside: true, margin: 0 }));
|
|
4261
4238
|
}
|
|
4262
4239
|
/**
|
|
4263
4240
|
* Get the shape at the current point.
|