Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -238,6 +238,49 @@ export function ViewerControls() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Selection cluster */}
|
||||
<div className="flex items-end gap-1.5">
|
||||
<Button
|
||||
variant={selectionMode ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
className="gap-2 h-9"
|
||||
onClick={() => setSelectionMode(!selectionMode)}
|
||||
disabled={!activeModelId}
|
||||
title="Clique nos elementos do modelo para selecionar (viga, chapa…)"
|
||||
>
|
||||
<MousePointerClick className="h-3.5 w-3.5" />
|
||||
<span className="font-mono text-xs">
|
||||
{selectionMode
|
||||
? hasSelection ? `${selectedElementKeys.size} sel.` : 'Selecionar…'
|
||||
: 'Selecionar'}
|
||||
</span>
|
||||
</Button>
|
||||
|
||||
{hasSelection && (
|
||||
<>
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9" onClick={hideSelectedElements} title="Esconder selecionados">
|
||||
<EyeOff className="h-3.5 w-3.5 text-muted-foreground" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9" onClick={isolateSelectedElements} title="Isolar selecionados (esconder o resto)">
|
||||
<Focus className="h-3.5 w-3.5 text-primary" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9" onClick={handleExportSelection} title="Exportar selecionados como GLB">
|
||||
<Download className="h-3.5 w-3.5 text-primary" />
|
||||
</Button>
|
||||
<Button variant="ghost" size="icon" className="h-9 w-9" onClick={clearElementSelection} title="Limpar seleção">
|
||||
<Undo2 className="h-3.5 w-3.5 text-muted-foreground" />
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
{hasHiddenOrIsolated && (
|
||||
<Button variant="ghost" size="sm" className="h-9 gap-1.5" onClick={showAllElements} title="Mostrar todos os elementos">
|
||||
<Eye className="h-3.5 w-3.5" />
|
||||
<span className="font-mono text-xs">Mostrar tudo</span>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
{/* Screenshot */}
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user