I want to synchronize with the scrollbar of an external div.
So, I wrote the following code.
const s1 = document.getElementById('externalDiv')
s1.addEventListener('scroll', () => {
myDiagram.position.x = s1.scrollLeft
})
I seem to be able to change the internal position.x
, but it doesn’t seem to be working in the display.
Do I need to call a method to redraw?
I would be very happy if you could give me some hints.