v0.36.9
This commit is contained in:
1 parent
992a1795af
commit
b9d716d260
3 files changed
+105
-9
No files matched your search
@@ -35,12 +35,17 @@ window.rustProxyOverviewRows = (() => {
|
||||
lastWidth = grid.clientWidth;
|
||||
const items = cards().filter(node => !node.hidden && node.getClientRects().length);
|
||||
if (!items.length) return;
|
||||
grid.classList.add("is-measuring-rows");
|
||||
// Measure as the saved (locked) dashboard: editing styles move a few
|
||||
// controls inside cards, which must not change the layout being edited.
|
||||
const editing = grid.classList.contains("is-unlocked");
|
||||
if (editing) grid.classList.remove("is-unlocked");
|
||||
grid.classList.add("has-row-units", "is-measuring-rows");
|
||||
// Bounding boxes include CSS zoom (Settings → Interface scale); grid tracks,
|
||||
// gaps and the row unit are in CSS pixels, so divide measurements by it.
|
||||
const zoom = zoomOf();
|
||||
const natural = items.map(node => node.getBoundingClientRect().height / zoom);
|
||||
grid.classList.remove("is-measuring-rows");
|
||||
if (editing) grid.classList.add("is-unlocked");
|
||||
const gap = parseFloat(getComputedStyle(grid).rowGap) || 0;
|
||||
const isStat = node => node.classList.contains("stat");
|
||||
// The unit is half of the smallest stat card, so every card ends within a
|
||||
|
||||
Reference in new issue
Block a user