@tldraw/editor 5.6.0-next.0b1aaf8f5861 → 5.6.0-next.133b55acee83
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 +12 -10
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js +3 -5
- package/dist-cjs/lib/editor/managers/ScribbleManager/ScribbleManager.js.map +2 -2
- package/dist-cjs/lib/license/LicenseManager.js +62 -4
- package/dist-cjs/lib/license/LicenseManager.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 +12 -10
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs +3 -5
- package/dist-esm/lib/editor/managers/ScribbleManager/ScribbleManager.mjs.map +2 -2
- package/dist-esm/lib/license/LicenseManager.mjs +62 -4
- package/dist-esm/lib/license/LicenseManager.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 +17 -15
- package/src/lib/editor/managers/ScribbleManager/ScribbleManager.ts +4 -6
- package/src/lib/license/LicenseManager.test.ts +204 -0
- package/src/lib/license/LicenseManager.ts +88 -4
- 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.6.0-next.
|
|
395
|
+
"5.6.0-next.133b55acee83",
|
|
396
396
|
"cjs"
|
|
397
397
|
);
|
|
398
398
|
//# sourceMappingURL=index.js.map
|
|
@@ -5928,9 +5928,10 @@ class Editor extends import_eventemitter3.default {
|
|
|
5928
5928
|
}
|
|
5929
5929
|
}
|
|
5930
5930
|
let workingShape = null;
|
|
5931
|
+
const initialPagePoint = import_Mat.Mat.applyToPoint(pageTransform, new import_Vec.Vec());
|
|
5931
5932
|
if (util.onResize && util.canResize(initialShape)) {
|
|
5932
5933
|
const newPagePoint = this._scalePagePoint(
|
|
5933
|
-
|
|
5934
|
+
initialPagePoint,
|
|
5934
5935
|
scaleOrigin,
|
|
5935
5936
|
scale,
|
|
5936
5937
|
scaleAxisRotation
|
|
@@ -5943,7 +5944,6 @@ class Editor extends import_eventemitter3.default {
|
|
|
5943
5944
|
);
|
|
5944
5945
|
myScale.x = areWidthAndHeightAlignedWithCorrectAxis ? scale.x : scale.y;
|
|
5945
5946
|
myScale.y = areWidthAndHeightAlignedWithCorrectAxis ? scale.y : scale.x;
|
|
5946
|
-
const initialPagePoint = import_Mat.Mat.applyToPoint(pageTransform, new import_Vec.Vec());
|
|
5947
5947
|
const { x, y } = this.getPointInParentSpace(initialShape.id, initialPagePoint);
|
|
5948
5948
|
workingShape = initialShape;
|
|
5949
5949
|
if (!opts.skipStartAndEndCallbacks) {
|
|
@@ -5989,24 +5989,26 @@ class Editor extends import_eventemitter3.default {
|
|
|
5989
5989
|
scale,
|
|
5990
5990
|
scaleAxisRotation
|
|
5991
5991
|
);
|
|
5992
|
-
const
|
|
5992
|
+
const repositionedPagePoint = import_Vec.Vec.Add(
|
|
5993
|
+
newPageCenter,
|
|
5994
|
+
import_Vec.Vec.Sub(initialPagePoint, initialPageCenter)
|
|
5995
|
+
);
|
|
5996
|
+
const repositionedLocalPoint = this.getPointInParentSpace(
|
|
5993
5997
|
initialShape.id,
|
|
5994
|
-
|
|
5998
|
+
repositionedPagePoint
|
|
5995
5999
|
);
|
|
5996
|
-
const newPageCenterInParentSpace = this.getPointInParentSpace(initialShape.id, newPageCenter);
|
|
5997
|
-
const delta = import_Vec.Vec.Sub(newPageCenterInParentSpace, initialPageCenterInParentSpace);
|
|
5998
6000
|
if (workingShape) {
|
|
5999
6001
|
return {
|
|
6000
6002
|
...workingShape,
|
|
6001
|
-
x:
|
|
6002
|
-
y:
|
|
6003
|
+
x: repositionedLocalPoint.x,
|
|
6004
|
+
y: repositionedLocalPoint.y
|
|
6003
6005
|
};
|
|
6004
6006
|
}
|
|
6005
6007
|
return {
|
|
6006
6008
|
id,
|
|
6007
6009
|
type: initialShape.type,
|
|
6008
|
-
x:
|
|
6009
|
-
y:
|
|
6010
|
+
x: repositionedLocalPoint.x,
|
|
6011
|
+
y: repositionedLocalPoint.y
|
|
6010
6012
|
};
|
|
6011
6013
|
}
|
|
6012
6014
|
/** @internal */
|