partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
250 stars 61 forks source link

[FEATURE/BUG?] Editor Molecule Display State Encapsulation #78

Open AaronLlanos opened 6 years ago

AaronLlanos commented 6 years ago

Description:

Observed Behavior:

Expected Behavior:

partridgejiang commented 6 years ago

Actually, it's a feature, :). All instances of editor in one page shares one instance of render configuration by default. The following code may help to create an isolated render configuration for a composer widget:

composer.getEditor().setRenderConfigs(new Kekule.Render.Render2DConfigs());  // explicitly set a new render config object
composer.newDoc();  // force the new config to take effect