fix: reduce Issue #30 frontend overhead and release 3.9.2

This commit is contained in:
Miura Yoshiki
2026-10-12 17:18:07 +00:00
parent 120ca6c9ea
commit e9b1294ccd
21 changed files with 485 additions and 54 deletions
+5 -4
View File
@@ -107,8 +107,10 @@ export function configureV39ReferenceImages(node) {
panelHeight = height;
panel.style.height = `${height}px`;
const computedHeight = Number(node.computeSize?.()[1]);
if (Number.isFinite(computedHeight) && typeof node.setSize === "function") {
node.setSize([Number(node.size?.[0]) || 340, computedHeight]);
const width = Number(node.size?.[0]) || 340;
if (Number.isFinite(computedHeight) && typeof node.setSize === "function"
&& (Number(node.size?.[0]) !== width || Number(node.size?.[1]) !== computedHeight)) {
node.setSize([width, computedHeight]);
}
};
let page = 0;
@@ -116,9 +118,8 @@ export function configureV39ReferenceImages(node) {
const setSelection = (slot, selection) => {
const target = selectors[slot - 1];
target.value = [...selection].sort((a, b) => a - b).join(",") || "off";
// The wrapped native callback owns invalidation and the immediate refresh.
target.callback?.(target.value);
invalidate(node);
refresh();
};
const refresh = () => {
const { count, known } = destination(node);