@almadar/ui 4.41.0 → 4.41.1
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/avl/index.cjs +9 -6
- package/dist/avl/index.js +9 -6
- package/package.json +1 -1
package/dist/avl/index.cjs
CHANGED
|
@@ -52646,13 +52646,16 @@ function layoutOrbitals(count, containerW, containerH) {
|
|
|
52646
52646
|
if (count === 1) return [{ cx: containerW / 2, cy: containerH / 2 }];
|
|
52647
52647
|
const cols = Math.min(count, Math.ceil(Math.sqrt(count)));
|
|
52648
52648
|
const rows = Math.ceil(count / cols);
|
|
52649
|
-
const
|
|
52650
|
-
const
|
|
52651
|
-
const
|
|
52652
|
-
const
|
|
52649
|
+
const edgePad = 24;
|
|
52650
|
+
const minCx = UNIT_DISPLAY_W / 2 + edgePad;
|
|
52651
|
+
const minCy = UNIT_DISPLAY_H / 2 + edgePad;
|
|
52652
|
+
const maxCx = Math.max(minCx, containerW - UNIT_DISPLAY_W / 2 - edgePad);
|
|
52653
|
+
const maxCy = Math.max(minCy, containerH - UNIT_DISPLAY_H / 2 - edgePad);
|
|
52654
|
+
const stepX = cols > 1 ? (maxCx - minCx) / (cols - 1) : 0;
|
|
52655
|
+
const stepY = rows > 1 ? (maxCy - minCy) / (rows - 1) : 0;
|
|
52653
52656
|
return Array.from({ length: count }, (_, i) => ({
|
|
52654
|
-
cx:
|
|
52655
|
-
cy:
|
|
52657
|
+
cx: minCx + i % cols * stepX,
|
|
52658
|
+
cy: minCy + Math.floor(i / cols) * stepY
|
|
52656
52659
|
}));
|
|
52657
52660
|
}
|
|
52658
52661
|
var avlOczWireId = 0;
|
package/dist/avl/index.js
CHANGED
|
@@ -52600,13 +52600,16 @@ function layoutOrbitals(count, containerW, containerH) {
|
|
|
52600
52600
|
if (count === 1) return [{ cx: containerW / 2, cy: containerH / 2 }];
|
|
52601
52601
|
const cols = Math.min(count, Math.ceil(Math.sqrt(count)));
|
|
52602
52602
|
const rows = Math.ceil(count / cols);
|
|
52603
|
-
const
|
|
52604
|
-
const
|
|
52605
|
-
const
|
|
52606
|
-
const
|
|
52603
|
+
const edgePad = 24;
|
|
52604
|
+
const minCx = UNIT_DISPLAY_W / 2 + edgePad;
|
|
52605
|
+
const minCy = UNIT_DISPLAY_H / 2 + edgePad;
|
|
52606
|
+
const maxCx = Math.max(minCx, containerW - UNIT_DISPLAY_W / 2 - edgePad);
|
|
52607
|
+
const maxCy = Math.max(minCy, containerH - UNIT_DISPLAY_H / 2 - edgePad);
|
|
52608
|
+
const stepX = cols > 1 ? (maxCx - minCx) / (cols - 1) : 0;
|
|
52609
|
+
const stepY = rows > 1 ? (maxCy - minCy) / (rows - 1) : 0;
|
|
52607
52610
|
return Array.from({ length: count }, (_, i) => ({
|
|
52608
|
-
cx:
|
|
52609
|
-
cy:
|
|
52611
|
+
cx: minCx + i % cols * stepX,
|
|
52612
|
+
cy: minCy + Math.floor(i / cols) * stepY
|
|
52610
52613
|
}));
|
|
52611
52614
|
}
|
|
52612
52615
|
var avlOczWireId = 0;
|