feat(ui): add docking, viewport controls and composed settings
Add shared dock layouts, navigation cube, range bands, progress actions and comparison surfaces. Extend toolbar menus and loading composition, and align tokens, registry entries, documentation and the living catalog.
This commit is contained in:
@@ -17,6 +17,8 @@ export interface ToolbarControllerOptions {
|
||||
maxSize?: number;
|
||||
lensCount?: number;
|
||||
autoHide?: boolean;
|
||||
hideDelay?: number;
|
||||
gap?: number;
|
||||
}
|
||||
|
||||
export interface ToolbarController {
|
||||
@@ -112,7 +114,7 @@ export function createToolbarController(initial: ToolbarControllerOptions): Tool
|
||||
};
|
||||
|
||||
const updateMagnification = (coordinate: number) => {
|
||||
const vertical = options.placement !== "bottom";
|
||||
const vertical = options.placement !== "bottom" && options.placement !== "top";
|
||||
const toolbarRect = toolbar.getBoundingClientRect();
|
||||
const entries = buttons
|
||||
.map((button) => ({
|
||||
@@ -148,7 +150,7 @@ export function createToolbarController(initial: ToolbarControllerOptions): Tool
|
||||
hideTimer = window.setTimeout(() => {
|
||||
hideTimer = null;
|
||||
if (!hovering) hide();
|
||||
}, NODEDC_TOOLBAR_DEFAULTS.hideDelay);
|
||||
}, Math.max(0,Math.min(15000,options.hideDelay ?? NODEDC_TOOLBAR_DEFAULTS.hideDelay)));
|
||||
};
|
||||
|
||||
const applyOptions = () => {
|
||||
@@ -208,7 +210,7 @@ export function createToolbarController(initial: ToolbarControllerOptions): Tool
|
||||
? event.clientX >= window.innerWidth - threshold
|
||||
: options.placement === "bottom"
|
||||
? event.clientY >= window.innerHeight - threshold
|
||||
: event.clientX <= threshold;
|
||||
: options.placement === "top" ? event.clientY <= threshold : event.clientX <= threshold;
|
||||
if (nearEdge) show();
|
||||
else if (visible && !hovering) scheduleHide();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user