@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarkivaev/scada",
3
- "version": "2.3.66",
3
+ "version": "2.3.67",
4
4
  "description": "SCADA domain objects, state persistence, and plant monitoring",
5
5
  "repository": {
6
6
  "type": "git",
@@ -94,6 +94,7 @@ body {
94
94
  fill: none;
95
95
  stroke: #3a5166;
96
96
  stroke-width: 1.4;
97
+ pointer-events: none;
97
98
  }
98
99
 
99
100
  .link--feeds {
@@ -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: 108 + k * 28 };
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
- const count = extras(nodes, area, x, placed);
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) {