fix(ui): keep information menus closed after Escape
This commit is contained in:
@@ -2371,7 +2371,7 @@ export function CatalogApp() {
|
||||
) : null}
|
||||
|
||||
<Window open={treeDemoOpen} title="Объекты сцены" placement="end" resizable draggable rect={treeDemoRect} onRectCommit={setTreeDemoRect} onClose={()=>setTreeDemoOpen(false)}>
|
||||
<Tree defaultExpandedDepth={2} renderActions={node=><Dropdown width={320} trigger={({setTriggerRef,show,open})=><IconButton ref={setTriggerRef} label={`Информация: ${node.label}`} aria-expanded={open} onMouseEnter={show} onFocus={show} onClick={show}><Icon name="info"/></IconButton>}><Description>{node.label}</Description></Dropdown>} label="Пример дерева объектов" selected={treeSelected} onSelect={setTreeSelected} onVisibilityChange={(_,visible)=>setTreeVisible(visible)} nodes={[{id:'scene',label:'Сцена',children:[{id:'model',label:'Модель',children:[{id:'cells',label:'Ячейки / внутренний блок',visible:treeVisible},{id:'panel',label:'Боковая панель корпуса / длинное название детали'}]}]}]}/>
|
||||
<Tree defaultExpandedDepth={2} renderActions={node=><Dropdown width={320} trigger={({setTriggerRef,show,open})=><IconButton ref={setTriggerRef} label={`Информация: ${node.label}`} aria-expanded={open} onMouseEnter={show} onClick={show}><Icon name="info"/></IconButton>}><Description>{node.label}</Description></Dropdown>} label="Пример дерева объектов" selected={treeSelected} onSelect={setTreeSelected} onVisibilityChange={(_,visible)=>setTreeVisible(visible)} nodes={[{id:'scene',label:'Сцена',children:[{id:'model',label:'Модель',children:[{id:'cells',label:'Ячейки / внутренний блок',visible:treeVisible},{id:'panel',label:'Боковая панель корпуса / длинное название детали'}]}]}]}/>
|
||||
</Window>
|
||||
<Window
|
||||
open={inspectorOpen}
|
||||
|
||||
+1
-1
@@ -571,4 +571,4 @@ The shared theme supports `edges: "flat"` for borderless surfaces, including por
|
||||
|
||||
Toolbar `menuWidth` controls inspector menu width (default 220 px, bounded 180–600 px); Dropdown retains viewport clamping. Tree `renderActions(node)` supports per-item information menus without duplicating the outliner. `defaultExpandedDepth` limits initial expansion; selecting an item still reveals and scrolls to its ancestors. BIM uses canonical `ruler` (Ruler), `section` (Slice), and `isolate` (Focus) glyphs.
|
||||
|
||||
Open Dropdown surfaces observe content size changes and recompute their viewport bounds, including asynchronous property/volume results. Hover/focus information triggers use `show` for pointer/keyboard activation; click must not immediately toggle a just-focused menu closed.
|
||||
Open Dropdown surfaces observe content size changes and recompute their viewport bounds, including asynchronous property/volume results. Information triggers open on hover or explicit pointer/keyboard activation with `show`. Do not open on focus alone: Escape restores trigger focus and must keep the menu closed.
|
||||
|
||||
Reference in New Issue
Block a user