Correct typo and improve init

This commit is contained in:
Guille 2024-05-15 13:38:15 +02:00
parent e23a95ac1b
commit 25088b99a7
3 changed files with 5 additions and 6 deletions

View File

@ -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",

View File

@ -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'

View File

@ -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