diff --git a/src/app/core/substance-ssg4m/substance-ssg4m-form.component.ts b/src/app/core/substance-ssg4m/substance-ssg4m-form.component.ts index 4dad0e5aa..070477b57 100644 --- a/src/app/core/substance-ssg4m/substance-ssg4m-form.component.ts +++ b/src/app/core/substance-ssg4m/substance-ssg4m-form.component.ts @@ -999,41 +999,13 @@ export class SubstanceSsg4ManufactureFormComponent implements OnInit, AfterViewI // if New Record, initialize object if (this.ssg4mSyntheticPathway == null) { this.ssg4mSyntheticPathway = {}; - - // Generate GUID SynthPathwayId - // this.ssg4mSyntheticPathway.synthPathwayId = '2ead5343-6471-88ae-b0b0-88370d44786e'; - // this.ssg4mSyntheticPathway = { "appType": "IND", "synthPathwayId": "2ead5343-6471-88ae-b0b0-88370d44574e", "sbmsnDataText": jsonValue }; } - // Existing Record // get the JSON from the SSG4m Form and store as a Clob into the database this.ssg4mSyntheticPathway.sbmsnDataText = jsonValue; - /*********** BEGIN SCHEME VIEW CODE ****************/ - // Added this scheme view block here. If we do not click on the "Scheme View" tab before saving, it adds - // extra space on the top during printing. - - //document.querySelector("#scheme-viz-view").className = ""; - - console.log("About to load the scheme view in submit() function during saving"); - - if (window['schemeUtil']) { - if (window['schemeUtil'].debug) { - window['schemeUtil'].executeWhenLoaded = (() => { - console.log("About to render the scheme view in submit() after executeWhenLoaded"); - window['schemeUtil'].renderScheme(window['schemeUtil'].makeDisplayGraph(JSON.parse(ssgjs)), "#scheme-viz-view"); - window['schemeUtil'].executeWhenLoaded = null; - }); - } else { - console.log("About to render the scheme view in submit() in else block"); - window['schemeUtil'].renderScheme(window['schemeUtil'].makeDisplayGraph(JSON.parse(ssgjs)), "#scheme-viz-view"); - } - } - - /************ END SCHEME VIEW *********************/ - - // Save SVG as blob + // Save SVG as Clob this.ssg4mSyntheticPathway.sbmsnImage = document.querySelector("#scheme-viz-view").innerHTML; // After submitting Save button, the UI waits for 5 seconds to see if it gets a response. @@ -1105,7 +1077,15 @@ export class SubstanceSsg4ManufactureFormComponent implements OnInit, AfterViewI }; //window + let tempCallback = window["schemeUtil"].onFinishedLayout; + window["schemeUtil"].onFinishedLayout = (s)=>{ + window["schemeUtil"].onFinishedLayout =(ss)=>{}; + + setTimeout(tempCallback(s),3000); + }; + window['schemeUtil'].renderScheme(window['schemeUtil'].makeDisplayGraph(JSON.parse(ssgjs)), "#scheme-viz-view"); + } cancelSubmit() { diff --git a/substance_dictionary/dictionary_current_all_entities.xlsx b/substance_dictionary/dictionary_current_all_entities.xlsx index 1c0e82289..e517f6905 100644 Binary files a/substance_dictionary/dictionary_current_all_entities.xlsx and b/substance_dictionary/dictionary_current_all_entities.xlsx differ