cheminfo / jsme

19 stars 5 forks source link

setZoom method #13

Open mrcrittall2016 opened 7 years ago

mrcrittall2016 commented 7 years ago

Hi guys,

I have been building a website that uses JME objects of fixed sizes. However, if an especially large molecule is copied into the object by way of smiles, then parts of the molecule are no longer visible unless one zooms out.

My question is, is there a way to set the zoom level of the JME object? Is there a method already in place for this?

Thanks

brunob54 commented 7 years ago

There is no setZoom() function now. I plan to implement one soon. I don't know what your website does and I wonder if using the depict mode might help?

brunob54 commented 7 years ago

I have updated JSME. The new version can set the zoom level of the of the molecular area and the GUI.

new API methods: getMolecularAreaScale(), setMolecularAreaScale(), getMenuScale(), setMenuScale()

brunob54 commented 7 years ago

There was a bug in the depiction: automatic scaling was not working anymore since I allowed custom zooming of the molecular area. This should be fixed.