@takagaki/cortex-decisions-viewer 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/render.js +10 -0
- package/package.json +1 -1
package/dist/render.js
CHANGED
|
@@ -1576,6 +1576,16 @@ const CLIENT_JS = `
|
|
|
1576
1576
|
} else {
|
|
1577
1577
|
wrap.scrollLeft = explorerState.sx || 0;
|
|
1578
1578
|
}
|
|
1579
|
+
// 各列は overflow-y:auto で独立に縦スクロールする。選択行が長い一覧
|
|
1580
|
+
// (Decisions 等)の途中にあると見えないため、選択行が列の中央に来るよう縦スクロールする。
|
|
1581
|
+
for (var ci = 0; ci < cols.children.length; ci++) {
|
|
1582
|
+
var colEl = cols.children[ci];
|
|
1583
|
+
var selItem = colEl.querySelector(".mc-item.selected");
|
|
1584
|
+
if (!selItem) continue;
|
|
1585
|
+
var crect = colEl.getBoundingClientRect();
|
|
1586
|
+
var irect = selItem.getBoundingClientRect();
|
|
1587
|
+
colEl.scrollTop += (irect.top - crect.top) - (colEl.clientHeight - irect.height) / 2;
|
|
1588
|
+
}
|
|
1579
1589
|
drawLines();
|
|
1580
1590
|
});
|
|
1581
1591
|
wrap.addEventListener("scroll", function () {
|