undo/redo working
This commit is contained in:
parent
924019e81c
commit
6e75866d4e
2 changed files with 201 additions and 96 deletions
|
|
@ -75,12 +75,12 @@ export function transformRect(rect: Rect2D, parts: string[], delta: Vec2D): Rect
|
|||
y: parts.includes("top") ? rect.topLeft.y + delta.y : rect.topLeft.y,
|
||||
},
|
||||
size: {
|
||||
x: Math.max(40, rect.size.x
|
||||
x: /*Math.max(40,*/ rect.size.x
|
||||
+ (parts.includes("right") ? delta.x : 0)
|
||||
- (parts.includes("left") ? delta.x : 0)),
|
||||
y: Math.max(40, rect.size.y
|
||||
- (parts.includes("left") ? delta.x : 0),
|
||||
y: /*Math.max(40,*/ rect.size.y
|
||||
+ (parts.includes("bottom") ? delta.y : 0)
|
||||
- (parts.includes("top") ? delta.y : 0)),
|
||||
- (parts.includes("top") ? delta.y : 0),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue