@wemap/geo 10.5.0 → 10.6.0

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/index.d.ts CHANGED
@@ -337,6 +337,9 @@ declare module '@wemap/geo' {
337
337
 
338
338
  export class GraphRouter<T> {
339
339
  constructor(network: Network<T>);
340
+
341
+ disabledEdges: Set<GraphEdge<T>>;
342
+
340
343
  getShortestPath(
341
344
  start: GraphNode<T> | Coordinates,
342
345
  end: GraphNode<T> | Coordinates,
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/geo"
14
14
  },
15
15
  "name": "@wemap/geo",
16
- "version": "10.5.0",
16
+ "version": "10.6.0",
17
17
  "bugs": {
18
18
  "url": "https://github.com/wemap/wemap-modules-js/issues"
19
19
  },
@@ -29,7 +29,7 @@
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
31
  "@wemap/logger": "^10.0.0",
32
- "@wemap/maths": "^10.3.1"
32
+ "@wemap/maths": "^10.6.0"
33
33
  },
34
- "gitHead": "da571076de6bd9f4f2653d097763ff1244a36ebb"
34
+ "gitHead": "4b046adea2d82a474aa3099f9ebea3c9f15eba19"
35
35
  }
@@ -20,8 +20,8 @@ class GraphRouter {
20
20
  /** @type {!(Network<T>)} */
21
21
  _network;
22
22
 
23
- /** @type {GraphEdge<T>[]} */
24
- disabledEdges = [];
23
+ /** @type {Set<GraphEdge<T>>} */
24
+ disabledEdges = new Set();
25
25
 
26
26
  /**
27
27
  * @param {!(Network<T>)} network
@@ -218,7 +218,7 @@ class GraphRouter {
218
218
  this._network.edges
219
219
  .filter(edge => {
220
220
 
221
- if (!acceptEdgeFn(edge) || this.disabledEdges.includes(edge)) {
221
+ if (!acceptEdgeFn(edge) || this.disabledEdges.has(edge)) {
222
222
  return false;
223
223
  }
224
224