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

score container ignores pre-generated SVGs #4

Open
musicog opened this issue Mar 20, 2019 · 0 comments
Open

score container ignores pre-generated SVGs #4

musicog opened this issue Mar 20, 2019 · 0 comments

Comments

@musicog
Copy link
Contributor

musicog commented Mar 20, 2019

The score container's render function currently ignores pregenerated SVGs:

 55  render() {
 56     if(Object.keys(this.props.score).length) {
 57       if(this.props.score.MEI[this.props.uri]) {
 58         this.props.score.vrvTk.loadData(this.props.score.MEI[this.props.uri]);
 59         this.props.score.vrvTk.setOptions(this.props.options ? this.props.options : defaultVrvOptions);
 60         var svg = this.props.score.vrvTk.renderToSVG(this.props.score.pageNum) ;
 61       } else if (this.props.score.SVG[this.props.uri]) {
 62         svg = this.props.score.SVG[this.props.uri];
 63       } else {
 64         svg = '';
 65       }

With this logic the conditional in line 61 will not be reached, since we must necessarily have the MEI for a particular URI (line 57) for the SVG to exist in the first place.

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

No branches or pull requests

1 participant