From cfdd7db2ec41aef37264a879ea560e484694351c Mon Sep 17 00:00:00 2001 From: salman Date: Wed, 11 Jan 2023 23:54:19 +0100 Subject: [PATCH] Bug fixes and final modifications. --- TrimSPlib.js | 6 ++++-- TrimSPweb.js | 8 -------- myplots.js | 6 ++++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index dc51cb2..204fea5 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -1194,8 +1194,10 @@ function startSequence(All) { writeAsciiFile(seq_file, data); // Remove the fort.33 and other redundant files - cmd="cd " + All["workPath"] + ";rm -f eingabe1.inp; rm -f fort.33"; - execute(cmd); + if (!webOrApp) { + cmd="cd " + All["workPath"] + ";rm -f eingabe1.inp; rm -f fort.33"; + execute(cmd); + } Progress=100; document.getElementById("pBar").style.width = Progress + "%"; document.getElementById("pBar").innerHTML = Progress + "%"; diff --git a/TrimSPweb.js b/TrimSPweb.js index 3705990..23508d7 100644 --- a/TrimSPweb.js +++ b/TrimSPweb.js @@ -1,17 +1,9 @@ // This file contains function that are web app specific -function getFiles(dir, filelist){ - fileList = []; - return fileList; -} function execute(command) { // exec(command, {stdio: 'inherit'}); } -function checkDir(directory) { - // Check whether directory exists, if not create it - return(1); -} function writeAsciiFile(filename,content) { // Write string content into ascii file filename diff --git a/myplots.js b/myplots.js index 31ea5e6..8dea766 100644 --- a/myplots.js +++ b/myplots.js @@ -1,4 +1,6 @@ -const Plotly = require('plotly.js-dist'); +if (!amIWeb()) { + const Plotly = require('plotly.js-dist'); +} function Plot_xy(plotdiv,x,y,labels){ // Plot (x,y) scatter with x/ylabels @@ -97,7 +99,7 @@ function sizePlot(){ function resizePl(flag){ let newx=this.innerWidth/2-50; - let newy=this.innerHeight-85; + let newy=this.innerHeight-185; var plotDiv1=this.document.getElementById("plotRge"); var plotDiv2=this.document.getElementById("plotFrac"); var update ={