Skip to content

Commit

Permalink
feat: Regard bounds of selected shapes for the position of the float …
Browse files Browse the repository at this point in the history
…menu

- It works well with curved lines
  • Loading branch information
miyanokomiya committed Oct 8, 2024
1 parent 2dd06ce commit 0852845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/floatMenu/FloatMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const FloatMenu: React.FC<Option> = ({
if (selectedShapes.length === 0) return;

const shapeComposite = shapeStore.shapeComposite;
const rect = shapeComposite.getWrapperRectForShapes(selectedShapes);
const rect = shapeComposite.getWrapperRectForShapes(selectedShapes, true);
const p = canvasToView(scale, viewOrigin, rect);
const width = rect.width / scale;
const height = rect.height / scale;
Expand Down

0 comments on commit 0852845

Please sign in to comment.