Remove crop tool

This commit is contained in:
syntaxbullet
2026-07-03 21:15:31 +02:00
parent 4ad0bb8b2c
commit 4590b47e19
11 changed files with 10 additions and 41 deletions

View File

@@ -122,7 +122,6 @@ export function App({ app }: AppProps) {
maskEdit={state.editor.maskEdit}
open={layersOpen}
dispatch={app.store.dispatch}
onClose={() => setLayersOpen(false)}
/>
<div className="absolute inset-x-0 bottom-4 z-10 flex justify-center">
<BottomControlsIsland

View File

@@ -16,10 +16,9 @@ export type LayersSheetProps = {
maskEdit?: MaskEditState;
open: boolean;
dispatch: AppStore["dispatch"];
onClose: () => void;
};
export function LayersSheet({ document, selection, maskEdit, open, dispatch, onClose }: LayersSheetProps) {
export function LayersSheet({ document, selection, maskEdit, open, dispatch }: LayersSheetProps) {
const selectedArtboardId = selection.artboardId ?? document.artboards[0]?.id;
const selectedLayer = findLayerInfoInDocument(document, selection.layerIds[0]);
const canGroup = Boolean(selection.artboardId && selection.layerIds.length > 0);
@@ -491,7 +490,3 @@ function createGroup(name: string): Layer {
function toolbarButtonClass() {
return "inline-flex h-8 items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.04] px-3 text-white/75 transition hover:border-white/20 hover:bg-white/10 hover:text-white disabled:pointer-events-none disabled:opacity-35";
}
function iconButtonClass() {
return "grid size-8 place-items-center rounded-full text-white/70 transition hover:bg-white/10 hover:text-white focus:outline-none focus-visible:outline-none";
}

View File

@@ -1,4 +1,4 @@
import { Crop, Cursor, Eraser, Hand, PaintBrush } from "@phosphor-icons/react";
import { Cursor, Eraser, Hand, PaintBrush } from "@phosphor-icons/react";
import { commandIds } from "@commands/ids";
import type { AppStore } from "@editor/store";
import type { InteractionMode, ToolId } from "@editor/tools";
@@ -41,8 +41,6 @@ export function ToolOverlay({ activeTool, interactionMode, dispatch }: ToolOverl
function iconForTool(tool: ToolId) {
switch (tool) {
case "crop":
return Crop;
case "brush":
return PaintBrush;
case "eraser":

View File

@@ -6,6 +6,5 @@ export function canvasCursorClass(interactionMode: InteractionMode, input: Canva
if (input.isPanning) return "cursor-grabbing";
if (isPanInteractionMode(interactionMode)) return "cursor-grab";
if (interactionMode.type === "tool" && (interactionMode.tool === "brush" || interactionMode.tool === "eraser")) return hasBrushPreview ? "cursor-none" : "cursor-crosshair";
if (interactionMode.type === "tool" && interactionMode.tool === "crop") return "cursor-crosshair";
return "cursor-default";
}

View File

@@ -117,7 +117,7 @@ export function useCanvasInput(
}
const currentState = store.getState();
const selectionToolActive = currentState.editor.tools.activeTool === "select" || currentState.editor.tools.activeTool === "crop";
const selectionToolActive = currentState.editor.tools.activeTool === "select";
const selected = selectionToolActive && handleArtboardSelection({
event: inputEvent,
document: currentState.document,

View File

@@ -2,8 +2,6 @@ import type { ToolId } from "@editor/tools";
export function labelForTool(tool: ToolId): string {
switch (tool) {
case "crop":
return "Crop";
case "brush":
return "Brush";
case "eraser":