Skip to content

Commit 89237a9

Browse files
committed
Fix
1 parent 50b0116 commit 89237a9

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

apps/builder/app/builder/features/workspace/canvas-tools/canvas-tools.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import {
1616
import { Label } from "./outline/label";
1717
import { Outline } from "./outline/outline";
1818
import { useSubscribeDragAndDropState } from "./use-subscribe-drag-drop-state";
19-
import { ResizeHandles } from "./resize-handles";
20-
import { MediaBadge } from "./media-badge";
2119
import { applyScale } from "./outline";
2220
import { $scale } from "~/builder/shared/nano-states";
2321
import { BlockChildHoveredInstanceOutline } from "./outline/block-instance-outline";
@@ -73,8 +71,6 @@ export const CanvasTools = () => {
7371

7472
return (
7573
<>
76-
<MediaBadge />
77-
<ResizeHandles />
7874
{isPreviewMode === false && (
7975
<>
8076
<SelectedInstanceOutline />

apps/builder/app/builder/features/workspace/workspace.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { $textEditingInstanceSelector } from "~/shared/nano-states";
1010
import { CanvasTools } from "./canvas-tools";
1111
import { useSetCanvasWidth } from "../breakpoints";
1212
import { selectInstance } from "~/shared/awareness";
13+
import { ResizeHandles } from "./canvas-tools/resize-handles";
14+
import { MediaBadge } from "./canvas-tools/media-badge";
1315

1416
const workspaceStyle = css({
1517
flexGrow: 1,
@@ -101,6 +103,7 @@ export const Workspace = ({ children, onTransitionEnd }: WorkspaceProps) => {
101103
selectInstance(undefined);
102104
$textEditingInstanceSelector.set(undefined);
103105
};
106+
const outlineStyle = useOutlineStyle();
104107

105108
return (
106109
<>
@@ -116,14 +119,21 @@ export const Workspace = ({ children, onTransitionEnd }: WorkspaceProps) => {
116119
>
117120
{children}
118121
</div>
122+
<div
123+
data-name="canvas-tools-wrapper"
124+
className={canvasContainerStyle({ css: { pointerEvents: "none" } })}
125+
style={outlineStyle}
126+
>
127+
<MediaBadge />
128+
<ResizeHandles />
129+
</div>
119130
</div>
120131
</>
121132
);
122133
};
123134

124135
export const CanvasToolsContainer = () => {
125136
const outlineStyle = useOutlineStyle();
126-
useSetCanvasWidth();
127137

128138
return (
129139
<>

0 commit comments

Comments
 (0)