Skip to content

Commit

Permalink
add scope's width and height in debug mode (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihebi committed Apr 22, 2023
1 parent d5c8361 commit 4659b5a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/components/nodes/Scope.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ export const ScopeNode = memo<NodeProps>(function ScopeNode({
// const selected = useStore(store, (state) => state.pods[id]?.selected);
const isGuest = useStore(store, (state) => state.role === "GUEST");
const inputRef = useRef<HTMLInputElement>(null);
const getPod = useStore(store, (state) => state.getPod);
const pod = getPod(id);

const devMode = useStore(store, (state) => state.devMode);
const isCutting = useStore(store, (state) => state.cuttingIds.has(id));
Expand Down Expand Up @@ -223,7 +225,8 @@ export const ScopeNode = memo<NodeProps>(function ScopeNode({
}}
className="nodrag"
>
{id} at ({xPos}, {yPos}), level: {data.level}
{id} at ({xPos}, {yPos}), w: {pod.width}, h: {pod.height} level:{" "}
{data.level}
</Box>
)}
<Grid container spacing={2} sx={{ alignItems: "center" }}>
Expand Down

0 comments on commit 4659b5a

Please sign in to comment.