-
Notifications
You must be signed in to change notification settings - Fork 379
Add beforeDraw and afterDraw hooks to the annotations
#744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Conflicts: types/options.d.ts
Conflicts: src/annotation.js
kurkle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't like the counters
How about making it simpler, just draw before/after the main element is drawn?
We could add afterDrawChildren later, if it's really needed.
I think its reasonable |
done! review applied! No counters anymore! |
kurkle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the huge delay on these. LGTM
This PR is adding before/after draw hooks in order to allow the user to apply whatever needed customization on out-of the-box annotations. Fix #146.
The hooks will be invoked once for every annotation for each drawing cycle.
annotation.beforeDrawannotation.afterDrawCommon hooks for all annotations can be set in the annotation plugin options:
TODO