Skip to content
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

Feature: Update renderer to take in a user-created Context type #724

Closed
mix3d opened this issue Nov 10, 2019 · 0 comments · Fixed by #1161
Closed

Feature: Update renderer to take in a user-created Context type #724

mix3d opened this issue Nov 10, 2019 · 0 comments · Fixed by #1161

Comments

@mix3d
Copy link
Contributor

mix3d commented Nov 10, 2019

Since the render contexts are currently hidden from the export, there isn't an easy way to extend context classes at the consumer level (without modifying vexflow source directly).

Assuming a new Context class implements / inherits the needed base Context functions (see @types/vexflows IRenderContext class for example), there shouldn't be any reason why the Renderer couldn't handle being passed in a custom Context class to instantiate itself with.

Another way to solve this issue, (that might allow for user error, however), would be to expose the Backend classes somewhere at the root level, such that a developer could extend/override those classes at runtime.

Either of these could be a solution to #722, letting a dev like myself fix in my own code, making it easier to introduce non-compliant but implementation specific features without having to fork the root project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant