Closed sowiso closed 3 years ago
Hi @sowiso, you can simply use the CSS to control the size of composer (and other widgets), e.g.:
#myComposer
{
width: 800px;
height: 600px;
}
In JavaScript, the setDimension
method can be used as well:
composer.setDimension('800px', '600px');
Hi @partridgejiang Thanks for your answer. I actually was aware of this, but was not clear enough on my question. I meant the size of the Chemical Document, the one inside the editor.
Hi @sowiso, you can change the default size of chem document by the config object of editor:
composer.getEditorConfigs().getChemSpaceConfigs().setDefScreenSize2D({x: 600, y: 400});
composer.newDoc();
Or using the changeChemSpaceScreenSize
method to modify the screen size of an opened document:
composer.getEditor().changeChemSpaceScreenSize({x: 600, y: 400});
Awesome, thanks!
Is there a way to set the inital screen size of the composer to something else than the default value?