Replies: 2 comments
-
Do you know if this requires much processing power? @AaronDavidNewman would that be something useful for smoosic? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Items that can be placed on the staff have a CATEGORY property that might be helpful with your event dispatch.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
factory.ts 4.1.0 modified to produce events
factory could generate events as they are being sent to the renderQ
`
private emitFactoryEvent(className: string, obj: any) {
this.dispatchEvent(
new CustomEvent('vexFlowFactoryEvent', { detail: {
className,
obj
}})
);
}
...
this.emitFactoryEvent("StaveNote", note);
this.renderQ.push(note); // ^^^ emit event prior rander
`
Note: if minification didn't mangle the class names I could use introspection and just have one call emitFactoryEvent inside the factory.draw function but sadly this isn't the case. this should be sufficient for users to trap events and create interactive music notation.
Beta Was this translation helpful? Give feedback.
All reactions