feat(view): show transform measurements
This commit is contained in:
@@ -20,6 +20,9 @@ export function App({ app }: AppProps) {
|
||||
const viewportActivityIsland = useViewportActivityIsland(state.editor.viewport);
|
||||
const [layersOpen, setLayersOpen] = useState(false);
|
||||
const selectionSummary = getSelectionSummary(state.document, state.editor.selection);
|
||||
const transformBounds = state.editor.transformSession?.target.type === "artboard"
|
||||
? state.document.artboards.find((artboard) => artboard.id === state.editor.transformSession?.target.id)?.bounds
|
||||
: undefined;
|
||||
|
||||
return (
|
||||
<main className="relative h-full overflow-hidden bg-background text-foreground">
|
||||
@@ -41,9 +44,10 @@ export function App({ app }: AppProps) {
|
||||
<div className="absolute inset-x-0 bottom-4 z-10 flex justify-center">
|
||||
<BottomControlsIsland
|
||||
viewport={state.editor.viewport}
|
||||
visible={selectionSummary.type !== "none" || viewportActivityIsland.visible}
|
||||
visible={Boolean(transformBounds) || selectionSummary.type !== "none" || viewportActivityIsland.visible}
|
||||
action={viewportActivityIsland.action}
|
||||
selection={selectionSummary}
|
||||
transformBounds={transformBounds}
|
||||
dispatch={app.store.dispatch}
|
||||
onOpenLayers={() => setLayersOpen(true)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user