From 4659b5aad7723e45bbb386cbf31bfb590eeb1e00 Mon Sep 17 00:00:00 2001 From: Hebi Li Date: Fri, 21 Apr 2023 18:24:41 -0700 Subject: [PATCH] add scope's width and height in debug mode (#237) --- ui/src/components/nodes/Scope.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/components/nodes/Scope.tsx b/ui/src/components/nodes/Scope.tsx index 56a4a849..cb543276 100644 --- a/ui/src/components/nodes/Scope.tsx +++ b/ui/src/components/nodes/Scope.tsx @@ -143,6 +143,8 @@ export const ScopeNode = memo(function ScopeNode({ // const selected = useStore(store, (state) => state.pods[id]?.selected); const isGuest = useStore(store, (state) => state.role === "GUEST"); const inputRef = useRef(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)); @@ -223,7 +225,8 @@ export const ScopeNode = memo(function ScopeNode({ }} className="nodrag" > - {id} at ({xPos}, {yPos}), level: {data.level} + {id} at ({xPos}, {yPos}), w: {pod.width}, h: {pod.height} level:{" "} + {data.level} )}