Fix Layers panel node chains (ellip)sizing incorrectly with fractional UI scales in Chromium (#4813)

Fix layer chain overflow at fractional UI scales
This commit is contained in:
Timon authored and GitHub committed 2026-10-25 22:03:24 +00:00
1 parent c48cb4c7c9
commit 4aa3ba34ea
1 file changed
+2 -1
+2 -1
View File
@@ -156,7 +156,8 @@
const chainResizeObserver = new ResizeObserver((entries) => {
entries.forEach((entry) => {
const rowIndex = Number(entry.target.closest("[data-layer]")?.getAttribute("data-index"));
if (!Number.isNaN(rowIndex)) chainWidths[rowIndex] = entry.contentRect.width;
// Rounded to avoid issue for fractional device pixel ratio
if (!Number.isNaN(rowIndex)) chainWidths[rowIndex] = Math.round(entry.contentRect.width);
});
chainWidths = chainWidths;
});