Closed akulmehta closed 2 years ago
Generally, you may set autofit to true in the draw options:
painter.draw(context, { 'x': dim.width / 2, 'y': dim.height / 2 }, {autofit: true});
Anyway, manually using the painter
is fairly complex. Instead, the Viewer
widget is much more recommended for displaying molecule and other chem objects.
Yes I switched to the viewer as well.
For viewer you can setAutofit using
as described in issue: #33
How can we do something similar in painter?
To be specific I am drawing a structure using painter as described in the documents using a function like: