@wemap/geo 10.3.1 → 10.5.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/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.3.1",
16
+ "version": "10.5.1",
17
17
  "bugs": {
18
18
  "url": "https://github.com/wemap/wemap-modules-js/issues"
19
19
  },
@@ -31,5 +31,5 @@
31
31
  "@wemap/logger": "^10.0.0",
32
32
  "@wemap/maths": "^10.3.1"
33
33
  },
34
- "gitHead": "e4775e59dd3db76cf7b3d1e63a3e2402bf5f0088"
34
+ "gitHead": "ce2d0e4a541b521098e5382bd665dc54805f1c27"
35
35
  }
@@ -20,6 +20,9 @@ class GraphRouter {
20
20
  /** @type {!(Network<T>)} */
21
21
  _network;
22
22
 
23
+ /** @type {Set<GraphEdge<T>>} */
24
+ disabledEdges = new Set();
25
+
23
26
  /**
24
27
  * @param {!(Network<T>)} network
25
28
  */
@@ -215,7 +218,7 @@ class GraphRouter {
215
218
  this._network.edges
216
219
  .filter(edge => {
217
220
 
218
- if (!acceptEdgeFn(edge)) {
221
+ if (!acceptEdgeFn(edge) || this.disabledEdges.has(edge)) {
219
222
  return false;
220
223
  }
221
224