editorView scroll events?


#1

This is a real long shot question. Does anyone know if there is an event that can be caught when an editorView scrolls? I’ve started working on a synced-scrolling package and syncing is kind of hard unless you know a scroll has happened.

There is the traditional Scroll DOM event fired when a div is scrolled, but unfortunately Atom uses a fancy GPU-enabled webkit-transform called translate3D to move the text contents around in an editorView.

I warned you that this was a long shot.


#2

I found it. I almost deleted this post since the answer was so easy. I was only looking at editorView events but the one I wanted was on the editor. It is Editor::scroll-top-changed.

I can never predict whether anything is done in the Editor or the EditorView. I had the impression scrolling was a view thing. Live and learn.