mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 07:05:43 -03:00
docs(dom_widget_dev_guide): clarify dynamic resizing and add performance note
- Add performance note explaining that providing `getMinHeight` and `getHeight` via `options` avoids expensive DOM measurements - Expand dynamic resizing section with detailed update sequence and common scenarios table - Update LoraPoolSummaryView.vue with `min-height: 0` to allow flex shrinking - Update main.ts to provide `getMinHeight` via options and adjust `computeLayoutSize` for performance
This commit is contained in:
@@ -34,7 +34,12 @@ function createLoraPoolWidget(node) {
|
||||
widget.onSetValue(v)
|
||||
}
|
||||
},
|
||||
serialize: true
|
||||
serialize: true,
|
||||
// Per dev guide: providing getMinHeight via options allows the system to
|
||||
// skip expensive DOM measurements during rendering loop, improving performance
|
||||
getMinHeight() {
|
||||
return 700
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -55,6 +60,13 @@ function createLoraPoolWidget(node) {
|
||||
vueApp.mount(container)
|
||||
vueApps.set(node.id, vueApp)
|
||||
|
||||
widget.computeLayoutSize = () => {
|
||||
const minWidth = 500
|
||||
const minHeight = 700
|
||||
|
||||
return { minHeight, minWidth }
|
||||
}
|
||||
|
||||
widget.onRemove = () => {
|
||||
const vueApp = vueApps.get(node.id)
|
||||
if (vueApp) {
|
||||
@@ -63,11 +75,6 @@ function createLoraPoolWidget(node) {
|
||||
}
|
||||
}
|
||||
|
||||
widget.computeLayoutSize = () => ({
|
||||
minHeight: 600,
|
||||
minWidth: 500
|
||||
})
|
||||
|
||||
return { widget }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user