Skip to content

Commit

Permalink
rounding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Muzina committed Apr 13, 2022
1 parent 0936f1d commit 7f66cc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def render_generatePage():
file.save(os.path.join(flaskApp.config['UPLOAD_FOLDER'], filename))

totalLength = request.form["selectedActivityLength"]
totalDistance = str(int(request.form["selectedActivityDistance"]))
totalDistance = request.form["selectedActivityDistance"]

if session["networkName"] != "gpxFile":
userCachedData[uniqueId]["visualizationResult"] = functions.getImageBase64String(generateVis.getVis(data=data, lineThickness=int(formArgs["pathThickness"]), gridOn=formArgs["displayGridLines"] == "on", backgroundColor=formArgs["backgroundColor"], backgroundImage = filename, backgroundBlur = formArgs["blurIntensity"], foregroundColor=formArgs["pathColor"], gridColor=formArgs["gridlineColor"], gridThickness=int(formArgs["gridThickness"]), infoText=formArgs["infoText"],silhouetteImage=formArgs["silhouetteImage"], duplicateActivities=formArgs["duplicateActivities"], textBackgroundFade=formArgs["textBackgroundFade"], totalTime=functions.getTimeStr(totalLength), totalDistance=str(totalDistance) + " mi."))
Expand Down
4 changes: 2 additions & 2 deletions static/activityFiltering.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ function searchActivities(activities) {
const selectedDistanceElement = document.getElementById("selectedActivityDistance");
selectedLengthElement["value"] = selectedActivitiesLength;
selectedLengthElement.setAttribute("value", selectedActivitiesLength);
selectedDistanceElement["value"] = selectedActivitiesDistance;
selectedDistanceElement.setAttribute("value", selectedActivitiesDistance);
selectedDistanceElement["value"] = Math.round(selectedActivitiesDistance);
selectedDistanceElement.setAttribute("value", Math.round(selectedActivitiesDistance));
}

// Element IDs of parameter input elements that should cause a live update of
Expand Down

0 comments on commit 7f66cc5

Please sign in to comment.