Skip to content

Commit

Permalink
Remove wrongly placed Rect.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
seanchas116 committed Apr 30, 2023
1 parent 815cdb4 commit fa3383a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 0 additions & 10 deletions packages/editor/src/types/Rect.ts

This file was deleted.

10 changes: 9 additions & 1 deletion packages/editor/src/views/viewport/hud/NodeResizeBox.tsx
Expand Up @@ -6,12 +6,20 @@ import { Selectable } from "@uimix/model/src/models";
import { projectState } from "../../../state/ProjectState";
import colors from "@uimix/foundation/src/colors";
import { ResizeBox } from "@uimix/foundation/src/components";
import { roundRectXYWH } from "../../../types/Rect";
import { snapper } from "../../../state/Snapper";
import { assertNonNull } from "@uimix/foundation/src/utils/Assert";
import { viewportState } from "../../../state/ViewportState";
import { resizeWithBoundingBox } from "@uimix/model/src/services";

function roundRectXYWH(rect: Rect): Rect {
return Rect.from({
x: Math.round(rect.left),
y: Math.round(rect.top),
width: Math.round(rect.width),
height: Math.round(rect.height),
});
}

class NodeResizeBoxState {
constructor() {
makeObservable(this);
Expand Down

2 comments on commit fa3383a

@vercel
Copy link

@vercel vercel bot commented on fa3383a Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on fa3383a Apr 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.