diff --git a/src/ProvenanceGraphTraverser.ts b/src/ProvenanceGraphTraverser.ts index c0e6814..f75a4d9 100644 --- a/src/ProvenanceGraphTraverser.ts +++ b/src/ProvenanceGraphTraverser.ts @@ -119,7 +119,7 @@ export class ProvenanceGraphTraverser implements IProvenanceGraphTraverser { */ async toStateNode( id: NodeIdentifier, - transtionTime: number + transtionTime?: number ): Promise { const currentNode = this.graph.current; const targetNode = this.graph.getNode(id); @@ -144,9 +144,8 @@ export class ProvenanceGraphTraverser implements IProvenanceGraphTraverser { const arg = this.getFunctionsAndArgsFromTrack(trackToTarget); functionsToDo = arg.functionsToDo; argumentsToDo = arg.argumentsToDo; - const transitionTimePerAction = transtionTime / functionsToDo.length; functionsToDo.forEach((func: any) => { - transitionTimes.push(transitionTimePerAction); + transitionTimes.push(transtionTime || 0); }); } catch (error) { if (error.invalidTraversal) { diff --git a/src/api.ts b/src/api.ts index 9cc3aac..5381704 100644 --- a/src/api.ts +++ b/src/api.ts @@ -316,7 +316,7 @@ export interface IProvenanceGraphTraverser { * * @param id */ - toStateNode(id: NodeIdentifier, transitionTime: number): Promise; + toStateNode(id: NodeIdentifier, transitionTime?: number): Promise; /** * Available events: