visjs / vis-timeline

📅 Create a fully customizable, interactive timelines and 2d-graphs with items and ranges.
https://visjs.github.io/vis-timeline/
Other
1.85k stars 311 forks source link

Invoke set range callback always and pass info about change #1703

Open zanella opened 11 months ago

zanella commented 11 months ago

The callback on zoomIn/zoomOut are only invoked inside setRange() when there's an actual change.

This makes it hard to decide what to do when using said functions (e.g. disable the zoom button if the max has been reached)

This change makes the button always be called, and to receive a new parameter, telling if a range change happened or not.


The linter pattern was not working (mac OS / zsh), now it is (npm run lint), but there are 78 problems 😅