Scroll to selected element

• Aug 22, 2022 - 10:50

Hullo fellow humans. I'm writing a plugin and one of the things I wanted to do is scroll to a selected element.

Suppose I've selected an element using curScore.selection.select(element). I then repaint the canvas using cmd("reset"). But how do I tell the plugin to scroll/pan to the selected element?

I know this can be done by hitting space twice to trigger playback, but I don't want audio to play... so is there a less hacky way?

Thanks in advance.


Comments

Do you still have an unanswered question? Please log in first to post your question.