Browse Source

fix: align method

Konstantinos Kaloutas 3 năm trước cách đây
mục cha
commit
7c5afa979b
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      tldraw/packages/core/src/lib/TLApp/TLApp.ts

+ 3 - 2
tldraw/packages/core/src/lib/TLApp/TLApp.ts

@@ -382,10 +382,11 @@ export class TLApp<
     if (shapes.length < 2) return this
 
     const boundsForShapes = shapes.map((shape) => {
+      const bounds = shape.getBounds();
       return {
         id: shape.id,
-        point: shape.getCenter(),
-        bounds: shape.getBounds(),
+        point: [bounds.minX, bounds.minY],
+        bounds: bounds,
       }
     })