Skip to content

Commit

Permalink
Emit event when timeline is stopped.
Browse files Browse the repository at this point in the history
  • Loading branch information
martindholmes committed Jun 7, 2022
1 parent ffb0c30 commit c2522b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/hcmc_ol.js
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,9 @@ hol.VectorLayer.prototype.timelinePlay = function(){
this.showHideFeature(true, i, -1);
}
}
//Generate a custom event that can be hooked by external code.
let ev = new CustomEvent('timelineChange', {detail: {timelinePoint: this.timelinePoints[this.timeline.value], playing: false}});
document.dispatchEvent(ev);
return true;
}

Expand Down

0 comments on commit c2522b3

Please sign in to comment.