fix: invalidate cached measurement on collapse and clarify padding source

This commit is contained in:
jaeone94
2026-03-30 21:25:07 +09:00
parent 3f1839b6b1
commit ebe23e682c
2 changed files with 2 additions and 1 deletions

View File

@@ -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(

View File

@@ -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"]'
)