mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-09 07:00:06 +00:00
[feat] Implement LOD (Level of Detail) system for Vue nodes
- Add useLOD composable with 3 zoom-based detail levels (minimal, reduced, full) - Implement conditional rendering in LGraphNode based on zoom level - Filter non-essential widgets at reduced LOD (keep interactive controls only) - Add LOD-specific CSS classes for visual optimizations - Update performance test thresholds for CI environment compatibility - Fix lint warnings in QuadTreeDebugSection component Performance impact: ~80% DOM element reduction at low zoom levels Zoom thresholds: 0.4 (minimal), 0.8 (full) for optimal quality/performance balance
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
>
|
||||
<!-- Vue nodes will be rendered here -->
|
||||
<slot />
|
||||
|
||||
|
||||
<!-- Debug: Viewport bounds visualization -->
|
||||
<div
|
||||
v-if="props.showDebugOverlay"
|
||||
@@ -23,9 +23,19 @@
|
||||
opacity: 0.5
|
||||
}"
|
||||
>
|
||||
<div style="position: absolute; top: 0; left: 0; background: red; color: white; padding: 2px 5px; font-size: 10px;">
|
||||
Viewport: {{ props.viewport?.width }}x{{ props.viewport?.height }}
|
||||
DPR: {{ devicePixelRatio }}
|
||||
<div
|
||||
style="
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: red;
|
||||
color: white;
|
||||
padding: 2px 5px;
|
||||
font-size: 10px;
|
||||
"
|
||||
>
|
||||
Viewport: {{ props.viewport?.width }}x{{ props.viewport?.height }} DPR:
|
||||
{{ devicePixelRatio }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -93,9 +103,12 @@ const handlePointerDown = (event: PointerEvent) => {
|
||||
const nodeElement = target.closest('[data-node-id]')
|
||||
|
||||
if (nodeElement) {
|
||||
const nodeId = nodeElement.getAttribute('data-node-id')
|
||||
// TODO: Emit event for node interaction
|
||||
console.log('Node interaction:', nodeId)
|
||||
// Node interaction with nodeId will be handled in future implementation
|
||||
console.log(
|
||||
'Node interaction detected:',
|
||||
nodeElement.getAttribute('data-node-id')
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user