Skip to content

Commit

Permalink
Pass default value weights = null to SvgDrawer.draw() from `Drawe…
Browse files Browse the repository at this point in the history
…r.draw()`

Resolves #171. Although the `weights` parameter was added to
`SvgDrawer.draw()` in f3693b3, the method call in `Drawer.draw()` wasn't
updated correspondingly. `Drawer.draw()` could be amended to also take a
`weights` argument, which it would pass to `SvgDrawer.draw()`, but this might
break existing code even more and would require an update of the
documentation of the README.
  • Loading branch information
christoph-elfmann committed Jun 15, 2023
1 parent 67bd106 commit 2c5d7ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/smiles-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5593,7 +5593,7 @@ class Drawer {
svg.setAttributeNS(null, 'viewBox', '0 0 ' + this.svgDrawer.opts.width + ' ' + this.svgDrawer.opts.height);
svg.setAttributeNS(null, 'width', this.svgDrawer.opts.width + '');
svg.setAttributeNS(null, 'height', this.svgDrawer.opts.height + '');
this.svgDrawer.draw(data, svg, themeName, infoOnly, highlight_atoms);
this.svgDrawer.draw(data, svg, themeName, null, infoOnly, highlight_atoms);
this.svgDrawer.svgWrapper.toCanvas(canvas, this.svgDrawer.opts.width, this.svgDrawer.opts.height);
}
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Drawer {
svg.setAttributeNS(null, 'viewBox', '0 0 ' + this.svgDrawer.opts.width + ' ' + this.svgDrawer.opts.height);
svg.setAttributeNS(null, 'width', this.svgDrawer.opts.width + '');
svg.setAttributeNS(null, 'height', this.svgDrawer.opts.height + '');
this.svgDrawer.draw(data, svg, themeName, infoOnly, highlight_atoms);
this.svgDrawer.draw(data, svg, themeName, null, infoOnly, highlight_atoms);
this.svgDrawer.svgWrapper.toCanvas(canvas, this.svgDrawer.opts.width, this.svgDrawer.opts.height);
}

Expand Down

0 comments on commit 2c5d7ab

Please sign in to comment.