Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -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 />
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user