Skip to content

Commit 80bb5ea

Browse files
update transform origin & positioning
1 parent b0a3281 commit 80bb5ea

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

editor/components/canvas/controller-zoom-control.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function ZoomControl({
1515
}) {
1616
const [isEditing, setIsEditing] = React.useState(false);
1717
const displayScale = (scale * 100).toFixed(0);
18-
const mincontrol = 0.01;
18+
const mincontrol = 0;
1919
return (
2020
<Wrapper>
2121
<Controls>

editor/components/canvas/interactive-canvas.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ const Controls = styled.div`
4848

4949
const ScalingAreaStaticRoot = styled.div`
5050
display: flex;
51-
align-items: center;
51+
align-items: flex-start; // when transform origin is top center.
52+
padding-top: 20px;
5253
justify-content: center;
5354
align-content: flex-start;
5455
align-self: stretch;
@@ -106,6 +107,7 @@ const ScalingArea = ({
106107
<div
107108
style={{
108109
transform: `scale(${scale})`,
110+
transformOrigin: "top center",
109111
}}
110112
>
111113
{children}

0 commit comments

Comments
 (0)