From bc99503ee29cb9025a28650db7dc16020c5370ba Mon Sep 17 00:00:00 2001 From: mroberge Date: Tue, 4 Apr 2017 12:55:49 -0400 Subject: [PATCH 1/5] clean errors and warnings --- chat.html | 4 ++-- d3-line-chunked.html | 6 +++--- oldindex.html | 7 +++---- spec/spec.analysis.js | 4 ++-- src/index-drawMap.js | 4 ++-- src/initialize.js | 4 ++-- src/local-storage.js | 2 +- src/requestData.js | 18 +++++++++--------- x-CDOrequest.html | 2 +- x-datarequest.html | 6 +++--- 10 files changed, 28 insertions(+), 29 deletions(-) diff --git a/chat.html b/chat.html index a74a3c8..4623141 100644 --- a/chat.html +++ b/chat.html @@ -14,7 +14,7 @@ var name = $('#nameInput').val(); var text = $('#messageInput').val(); myDataRef.push({name: name, text: text}); - $('#messageInput').val(''); + text.val(''); } }); myDataRef.on('child_added', function(snapshot) { @@ -24,7 +24,7 @@ function displayChatMessage(name, text) { $('
').text(text).prepend($('').text(name+': ')).appendTo($('#messagesDiv')); $('#messagesDiv')[0].scrollTop = $('#messagesDiv')[0].scrollHeight; - }; + } \ No newline at end of file diff --git a/d3-line-chunked.html b/d3-line-chunked.html index 47fb6e1..209b321 100644 --- a/d3-line-chunked.html +++ b/d3-line-chunked.html @@ -106,7 +106,7 @@

d3-line-chunked

d3.select('.chart-container').append('button') .text('New Data') - .on('click', function () { updateChart(generateRandom(20)); }) + .on('click', function () { updateChart(generateRandom(20)); }); updateChart(data); } @@ -119,7 +119,7 @@

d3-line-chunked

.curve(d3.curveLinear) .defined(function (d) { return d.y != null; }) .lineStyles({ - stroke: '#0bb', + stroke: '#0bb' }); root @@ -189,7 +189,7 @@

d3-line-chunked

.attr('x1', function (d) { return x(d.x); }) .attr('x2', function (d) { return x(d.x); }) .attr('y1', 0) - .attr('y2', height) + .attr('y2', height); binding.exit().remove(); } diff --git a/oldindex.html b/oldindex.html index fb6b035..2d35d51 100644 --- a/oldindex.html +++ b/oldindex.html @@ -246,7 +246,6 @@ } else { //don't need to plot a thing if we aren't showing a graph. } - ; } $(function() { @@ -363,12 +362,12 @@

HydroCloud

var filename = "resources/USGSshort.txt"; } else { var filename = "http://waterservices.usgs.gov/nwis/iv/?format=json&sites=" + id + "&period=P30D¶meterCd=00060"; - }; + } d3.json(filename, function(error, json) { if (error) { if (error.status === 0) { alert("CORS is not enabled."); - }; + } return console.warn(error); } //if (!json.value.timeSeries[0].values[0].value){console.warn("there is no data for this site")}; @@ -397,7 +396,7 @@

HydroCloud

-