Add pan tool toolbar
This commit is contained in:
12
view/App.tsx
12
view/App.tsx
@@ -1,5 +1,7 @@
|
||||
import type { ImageStudioApp } from "@app/app";
|
||||
import { CanvasViewport } from "./CanvasViewport";
|
||||
import { ToolOverlay } from "./ToolOverlay";
|
||||
import { labelForTool } from "./toolLabels";
|
||||
import { useAppState } from "./useAppState";
|
||||
import "./index.css";
|
||||
|
||||
@@ -16,9 +18,17 @@ export function App({ app }: AppProps) {
|
||||
<header className="pointer-events-none absolute inset-x-0 top-0 z-10 flex h-8 items-center justify-between px-3 text-white">
|
||||
<h1 className="text-sm font-medium">Image Studio</h1>
|
||||
<div className="text-xs">
|
||||
{state.document.name} · {zoomPercent}% · {state.editor.viewport.size.w}×{state.editor.viewport.size.h}
|
||||
{state.document.name} · {labelForTool(state.editor.tools.activeTool)} · {zoomPercent}% · {state.editor.viewport.size.w}×
|
||||
{state.editor.viewport.size.h}
|
||||
</div>
|
||||
</header>
|
||||
<div className="absolute left-3 top-1/2 z-10 -translate-y-1/2">
|
||||
<ToolOverlay
|
||||
activeTool={state.editor.tools.activeTool}
|
||||
interactionMode={state.editor.tools.interactionMode}
|
||||
dispatch={app.store.dispatch}
|
||||
/>
|
||||
</div>
|
||||
<CanvasViewport store={app.store} />
|
||||
</main>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user