fix: refresh DomWidget style on visibility transition; revert stale baselines

Two follow-ups to the previous viewport-tracking fix:

1) DomWidget.vue: when low_quality flips while a widget has hideOnZoom,
   the widget toggles invisible→visible without canvas-space pos
   changing. The position watcher must also fire on visibility changes,
   so updatePosition re-evaluates against the current ds.scale/offset
   instead of the stale style captured the last time the widget was
   updated. Without this, hideOnZoom widgets reappear at their pre-LOD
   screen position.

2) Revert the 21 PNG baselines from the [automated] regen commit. They
   were generated against the buggy pre-fix state where DOM widgets
   stayed at their old screen position during pan/zoom. With the fix,
   widgets correctly track the canvas viewport, and the original
   main-branch baselines apply.
This commit is contained in:
bymyself
2026-05-04 00:58:33 -07:00
parent 85ea84635a
commit e03949b7fb
22 changed files with 19 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -121,13 +121,26 @@ function composeStyle() {
}
}
watch([() => widgetState.pos, () => widgetState.size, left, top], () => {
updatePosition(widgetState)
if (enableDomClipping.value) {
updateDomClipping()
watch(
[
() => widgetState.pos,
() => widgetState.size,
// Visibility transitions (e.g. LOD low_quality flipping) must refresh
// style: while invisible, DomWidgets.vue does not update widgetState
// and ds.offset/ds.scale are non-reactive, so updatePosition must be
// re-run against the current viewport when the widget reappears.
() => widgetState.visible,
left,
top
],
() => {
updatePosition(widgetState)
if (enableDomClipping.value) {
updateDomClipping()
}
composeStyle()
}
composeStyle()
})
)
watch(
[