Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-05-24 20:51:23 +00:00
parent 083c9d83ae
commit 5790df1541
+24
View File
@@ -107,6 +107,30 @@ export function ViewerControls() {
<span className="font-mono text-xs">Grid</span> <span className="font-mono text-xs">Grid</span>
</Button> </Button>
{/* Grid calibration: click a face on the piece to anchor the grid there */}
<Button
variant={gridCalibMode ? 'default' : 'outline'}
size="sm"
className="gap-2 h-9"
disabled={!activeModelId}
onClick={() => {
const next = !gridCalibMode;
setGridCalibMode(next);
if (next) {
setGridAutoFollow(false);
toast.info('Calibrar Grid: clique numa face da peça');
} else {
toast.dismiss();
}
}}
title="Posiciona o grid na altura de uma face da peça"
>
<LayoutGrid className="h-3.5 w-3.5" />
<span className="font-mono text-xs">
{gridCalibMode ? 'Clique na face…' : 'Calibrar Grid'}
</span>
</Button>
{/* Scale presets */} {/* Scale presets */}
<ScaleSelector /> <ScaleSelector />