Skip to content

Commit

Permalink
make path IDs static, so they are always unique (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
samanabo committed Oct 1, 2020
1 parent 7d1a02b commit 6853464
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugin/components/ant-path.component.js
Expand Up @@ -32,12 +32,14 @@ export default class AntPath extends FeatureGroup {
pulseColor: "#FFFFFF"
};

static pathId = 0;

constructor(path, customOptions = {}) {
super();

Util.setOptions(this, { ...this._defaultOptions, ...customOptions });
this._path = path;
this._animatedPathId = `ant-path-${new Date().getTime()}`;
this._animatedPathId = `ant-path-${AntPath.pathId++}`;
this._mount();
}

Expand Down

0 comments on commit 6853464

Please sign in to comment.