From 89ea9564c83599bf9fb46b9c364e7e4638f5660a Mon Sep 17 00:00:00 2001 From: Kristjan Komlosi Date: Tue, 2 Jun 2020 10:45:16 +0200 Subject: [PATCH] fixed onclick binding --- frontend/frontend.js | 8 +++----- frontend/index.html | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index d4ad926..1ff9518 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -1,7 +1,5 @@ // All code in this file is licensed under the ISC license, provided in LICENSE.txt -$('#update').click(function () { - updateData(); -}); +$('#update').click(updateData); // jQuery event binder function updateData () { @@ -28,8 +26,8 @@ function graphSpectralData (obj, dom) { graphXTicks.push([i, specter[i]]); } const options = { - grid: {color: 'white'}, - xaxis: {ticks: graphXTicks} + grid: { color: 'white' }, + xaxis: { ticks: graphXTicks } }; $.plot('#graph', [graphPoints], options); // flot expects an array of arrays (lines) of 2-element arrays (points) diff --git a/frontend/index.html b/frontend/index.html index 94e7c67..51b3fb5 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -25,11 +25,11 @@
- +
- +