@tldraw/editor 5.5.0-canary.c4ee38fb6d3c → 5.5.0-canary.c8596b8dd992

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 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.c4ee38fb6d3c",
395
+ "5.5.0-canary.c8596b8dd992",
396
396
  "cjs"
397
397
  );
398
398
  //# sourceMappingURL=index.js.map
@@ -6030,11 +6030,20 @@ class Editor extends import_eventemitter3.default {
6030
6030
  initialShape: options.initialShape,
6031
6031
  initialBounds: options.initialBounds,
6032
6032
  isAspectRatioLocked: options.isAspectRatioLocked,
6033
- initialPageTransform: options.initialPageTransform
6033
+ initialPageTransform: options.initialPageTransform,
6034
+ dragHandle: options.dragHandle,
6035
+ mode: options.mode,
6036
+ // this is one frame of the same resize, not a new one, so don't fire start/end again
6037
+ skipStartAndEndCallbacks: options.skipStartAndEndCallbacks
6034
6038
  });
6035
6039
  if (Math.sign(scale.x) * Math.sign(scale.y) < 0) {
6036
6040
  const parentRotation = this.getShapeParentTransform(id).rotation();
6037
- const rotation = -options.initialShape.rotation - 2 * parentRotation;
6041
+ const parentDelta = (0, import_utils2.shortAngleDist)(
6042
+ import_Mat.Mat.Cast(options.initialPageTransform).rotation() - options.initialShape.rotation,
6043
+ parentRotation
6044
+ );
6045
+ const initialParentRotation = parentRotation - parentDelta;
6046
+ const rotation = 2 * options.scaleAxisRotation - options.initialShape.rotation - 2 * initialParentRotation - parentDelta;
6038
6047
  this.updateShapes([{ id, type, rotation }]);
6039
6048
  }
6040
6049
  const preScaleShapePageCenter = import_Mat.Mat.applyToPoint(