Skip to content

Commit

Permalink
fix for editor toggle for polymers
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoAnderson committed Aug 23, 2024
1 parent 72e1b6e commit 242442f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/core/structure-editor/structure-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,14 @@ export class StructureEditorComponent implements OnInit, AfterViewInit, OnDestro
}

this.editor.getMolfile().pipe(take(1)).subscribe(Response => {

this.structureEditor = 'ketcher';
// this.editor = new EditorImplementation(this.ketcher, this.jsdraw, 'ketcher');
this.editor = new EditorImplementation(this.ketcher);
this.structureService.interpretStructure(Response).subscribe(resp => {
this.ketcher.setMolecule(resp.structure.molfile);
this.editorSwitched.emit(this.structureEditor);
this.editorOnLoad.emit(this.editor);
// only required for JSDRaw, ends up deleting brackets occasionally in some pages if enabled for ketcher
// this.editorOnLoad.emit(this.editor);

});
sessionStorage.setItem('gsrsStructureEditor', 'ketcher');
Expand Down

0 comments on commit 242442f

Please sign in to comment.