Var testmol = new ChemDoodle.ViewerCanvas('testmol', 300, 300)
CHEMDOODLE WEB API CODE
The javascript code for the standard canvas: Standard canvas with a caffeine molecule and colored atom labels:Īnd here, the same canvas with the molecule scaled by the size of the canvas: The standard viewercanvas will not scale molecules to the size of the canvas.
Here I will show how you can scale a molecule to the size of the canvas. But you can fix most things by using standard javascript (at least as long as you're only using a standard viewer canvas, without zoom functionality). However, the standard API still is missing some functionality. Very nice GPL licensed javascript library for chemical 2D (and 3D if you have a webGL supporting browser). I have played around a bit with chemdoodle web compontents.