Open davidfufu opened 6 years ago
@davidfufu I have a PR to expose the vis.js timeline element that you might find helpful: https://github.com/Lighthouse-io/react-visjs-timeline/pull/52
I like @jtrinklein implementation, but that does not seem available at present, I worked around it this manner
constuctor() { this.timeline = React.createRef(); this.zoomIn = this.zoomIn.bind(this); }
` render() {
} `
zoomIn() { this.timeline.current.$el.zoomIn(0.2) }
ZoomIn, ZoomOut does not work - it always reset to options.start and options.end
this.timeline.current.$el.zoomIn(0.2)
Does anyone know what is the new way to set the timeline element? There is no $el in the new vis-timeline. I tried timeline.current.timeline.zoomIn(0.2) as it's where I saw the zoomIn but it didn't work.
I can't find a way to make the timeline zoom into a specific level of zoom. I looked over the source code, and I've thought of creating a method like
But, I can't think of a way to expose an internal method of a component that could be accessed when importing the component. Need some help on this if anyone has any ideas.