Improve status message for brush selections in App.tsx
This commit is contained in:
@@ -6115,17 +6115,41 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
break;
|
break;
|
||||||
case "brushFace":
|
case "brushFace":
|
||||||
setStatusMessage(
|
setStatusMessage(
|
||||||
`Selected ${BOX_FACE_LABELS[selection.faceId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
`Selected ${
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId) ===
|
||||||
|
undefined
|
||||||
|
? selection.faceId
|
||||||
|
: getBrushFaceLabel(
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId)!,
|
||||||
|
selection.faceId
|
||||||
|
)
|
||||||
|
} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "brushEdge":
|
case "brushEdge":
|
||||||
setStatusMessage(
|
setStatusMessage(
|
||||||
`Selected ${BOX_EDGE_LABELS[selection.edgeId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
`Selected ${
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId) ===
|
||||||
|
undefined
|
||||||
|
? selection.edgeId
|
||||||
|
: getBrushEdgeLabel(
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId)!,
|
||||||
|
selection.edgeId
|
||||||
|
)
|
||||||
|
} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "brushVertex":
|
case "brushVertex":
|
||||||
setStatusMessage(
|
setStatusMessage(
|
||||||
`Selected ${BOX_VERTEX_LABELS[selection.vertexId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
`Selected ${
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId) ===
|
||||||
|
undefined
|
||||||
|
? selection.vertexId
|
||||||
|
: getBrushVertexLabel(
|
||||||
|
brushList.find((brush) => brush.id === selection.brushId)!,
|
||||||
|
selection.vertexId
|
||||||
|
)
|
||||||
|
} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.`
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case "paths":
|
case "paths":
|
||||||
|
|||||||
Reference in New Issue
Block a user