From 25088b99a710011075d9d95a64abc6c4d90e5f8e Mon Sep 17 00:00:00 2001 From: Guille Date: Wed, 15 May 2024 13:38:15 +0200 Subject: [PATCH] Correct typo and improve init --- package.json | 2 +- workflows/energy_plus/run.js | 4 ++-- workflows/meb/run.js | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index a898284..08fbd7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "WorkflowLauncher", - "version": "1.0.3", + "version": "1.0.4", "description": "NextGen Institute workflows", "main": "main.js", "homepage": "https://nextgenerations-cities.encs.concordia.ca/gitea/g_gutierrez/workflow_launcher", diff --git a/workflows/energy_plus/run.js b/workflows/energy_plus/run.js index 81eae42..dae5c42 100644 --- a/workflows/energy_plus/run.js +++ b/workflows/energy_plus/run.js @@ -6,9 +6,9 @@ document.getElementById("runWorkflow").addEventListener("click", runWorkflow) document.getElementById("geometry_file").addEventListener("change", (event) => { const file = event.target.files[0] document.getElementById('parameters').style.visibility = 'visible' - var extension = 'unknown' + let extension if (file.name.split('.').length == 2) { - extension == file.name.split('.')[1] + extension = file.name.split('.')[1] } if (file.type == 'application/geo+json' || extension == 'geojson') { document.getElementById('height').style.display = 'block' diff --git a/workflows/meb/run.js b/workflows/meb/run.js index 5346aa9..dd7964f 100644 --- a/workflows/meb/run.js +++ b/workflows/meb/run.js @@ -6,15 +6,14 @@ document.getElementById("runWorkflow").addEventListener("click", runWorkflow) document.getElementById("geometry_file").addEventListener("change", (event) => { const file = event.target.files[0] document.getElementById('parameters').style.visibility = 'visible' - var extension = 'unknown' + let extension if (file.name.split('.').length == 2) { - extension == file.name.split('.')[1] + extension = file.name.split('.')[1] } if (file.type == 'application/geo+json' || extension == 'geojson') { document.getElementById('height').style.display = 'block' } else { - console.log(file.name.split('.')[1]) document.getElementById('height').style.display = 'none' } param['geometry_file'] = file.path