@packtrack/layout 1.6.6 → 1.6.7

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.
@@ -15,7 +15,7 @@ export declare class Layout {
15
15
  monitors: Monitor[];
16
16
  throttles: Throttle[];
17
17
  get allDistricts(): District[];
18
- static from(document: any): Layout;
18
+ static from(railway: any): Layout;
19
19
  loadMonitor(source: any, parent: District | Layout): Monitor;
20
20
  loadThrottle(source: any, parent: District | Layout): Throttle;
21
21
  loadDistrict(source: any, parent: District | Layout): District;
@@ -35,9 +35,8 @@ export class Layout {
35
35
  }
36
36
  return districts;
37
37
  }
38
- static from(document) {
38
+ static from(railway) {
39
39
  const layout = new Layout();
40
- const railway = document.firstChild;
41
40
  layout.name = railway.getAttribute('name');
42
41
  const version = railway.getAttribute('version');
43
42
  if (version == '1') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@packtrack/layout",
3
- "version": "1.6.6",
3
+ "version": "1.6.7",
4
4
  "type": "module",
5
5
  "main": ".built/index.js",
6
6
  "typings": ".built/index.d.ts",
package/source/layout.ts CHANGED
@@ -45,10 +45,8 @@ export class Layout {
45
45
  return districts;
46
46
  }
47
47
 
48
- static from(document: any) {
48
+ static from(railway: any) {
49
49
  const layout = new Layout();
50
-
51
- const railway = document.firstChild!;
52
50
  layout.name = railway.getAttribute('name');
53
51
 
54
52
  const version = railway.getAttribute('version');
package/source/section.ts CHANGED
@@ -86,7 +86,6 @@ export class Section {
86
86
  const span = Span.trail(startPosition, endPosition);
87
87
 
88
88
  const tiles: Tile[] = [];
89
-
90
89
  let sectionLength = 0;
91
90
 
92
91
  if (startPosition.section == endPosition.section) {