@yarkivaev/scada 2.3.66 → 2.3.67
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/package.json
CHANGED
|
@@ -26,18 +26,21 @@ function machines(nodes, area, x, base, placed) {
|
|
|
26
26
|
|
|
27
27
|
function extras(nodes, area, x, placed) {
|
|
28
28
|
const items = children(nodes, area.id, 'collector');
|
|
29
|
+
if (items.length === 0) {
|
|
30
|
+
return 150;
|
|
31
|
+
}
|
|
32
|
+
const pitch = 64;
|
|
33
|
+
const head = 124;
|
|
29
34
|
items.forEach((col, k) => {
|
|
30
|
-
placed[col.id] = { x, y:
|
|
35
|
+
placed[col.id] = { x, y: head + k * pitch };
|
|
31
36
|
});
|
|
32
|
-
return items.length;
|
|
37
|
+
return head + items.length * pitch + 48;
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
function column(area, index, nodes, placed) {
|
|
36
41
|
const x = 170 + index * 280;
|
|
37
42
|
placed[area.id] = { x, y: 56 };
|
|
38
|
-
|
|
39
|
-
const base = count === 0 ? 150 : 108 + count * 28 + 50;
|
|
40
|
-
machines(nodes, area, x, base, placed);
|
|
43
|
+
machines(nodes, area, x, extras(nodes, area, x, placed), placed);
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
function leftovers(nodes, placed) {
|