mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 15:10:06 +00:00
code improve
This commit is contained in:
@@ -335,9 +335,10 @@ function initSizeStyles() {
|
||||
if (!el) return
|
||||
|
||||
const suffix = isCollapsed.value ? '-x' : ''
|
||||
const fullHeight = height + LiteGraph.NODE_TITLE_HEIGHT
|
||||
|
||||
el.style.setProperty(`--node-width${suffix}`, `${width}px`)
|
||||
el.style.setProperty(`--node-height${suffix}`, `${height}px`)
|
||||
el.style.setProperty(`--node-height${suffix}`, `${fullHeight}px`)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,8 +364,9 @@ function handleLayoutChange(change: {
|
||||
if (!el) return
|
||||
|
||||
const newSize = size.value
|
||||
const fullHeight = newSize.height + LiteGraph.NODE_TITLE_HEIGHT
|
||||
el.style.setProperty('--node-width', `${newSize.width}px`)
|
||||
el.style.setProperty('--node-height', `${newSize.height}px`)
|
||||
el.style.setProperty('--node-height', `${fullHeight}px`)
|
||||
}
|
||||
|
||||
let unsubscribeLayoutChange: (() => void) | null = null
|
||||
|
||||
Reference in New Issue
Block a user