mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: invalidate cached measurement on collapse and clarify padding source
This commit is contained in:
@@ -12,7 +12,7 @@ export interface MeasureResult {
|
||||
nodeVisualBounds: Record<string, CanvasRect>
|
||||
}
|
||||
|
||||
// Must match the padding value passed to createBounds() in selectionBorder.ts
|
||||
// Must match createBounds(selectedItems, 10) in src/extensions/core/selectionBorder.ts:19
|
||||
const SELECTION_PADDING = 10
|
||||
|
||||
export async function measureSelectionBounds(
|
||||
|
||||
@@ -151,6 +151,7 @@ const resizeObserver = new ResizeObserver((entries) => {
|
||||
// but store collapsed dimensions in vueBoundsOverrides for onBounding.
|
||||
if (elementType === 'node' && element.dataset.collapsed != null) {
|
||||
if (nodeId) {
|
||||
markElementForFreshMeasurement(element)
|
||||
const body = element.querySelector(
|
||||
'[data-testid^="node-inner-wrapper"]'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user