diff --git a/packages/dev/esbuild.config.mjs b/packages/dev/esbuild.config.mjs index c7e81d5c6..e29c10f5d 100644 --- a/packages/dev/esbuild.config.mjs +++ b/packages/dev/esbuild.config.mjs @@ -32,7 +32,7 @@ esbuild if (isDevServer) { serve.start({ - port: 3000, + port: 5000, root: './dist', live: true, }) diff --git a/packages/tldraw/src/shape/shapes/arrow/arrow.tsx b/packages/tldraw/src/shape/shapes/arrow/arrow.tsx index 538ba38d4..93f777f1b 100644 --- a/packages/tldraw/src/shape/shapes/arrow/arrow.tsx +++ b/packages/tldraw/src/shape/shapes/arrow/arrow.tsx @@ -597,13 +597,13 @@ export class Arrow extends TLDrawShapeUtil { const offset = [bounds.minX, bounds.minY] - nextShape.handles = Object.fromEntries( - Object.entries(nextShape.handles).map(([key, handle]) => { - return [key, { ...handle, point: Vec.add(handle.point, Vec.neg(offset)) }] + if (!Vec.isEqual(offset, [0, 0])) { + Object.values(nextShape.handles).forEach((handle) => { + handle.point = Vec.round(Vec.sub(handle.point, offset)) }) - ) as ArrowShape['handles'] - nextShape.point = Vec.add(nextShape.point, offset) + nextShape.point = Vec.round(Vec.add(nextShape.point, offset)) + } return nextShape }