diff --git a/static/index.html b/static/index.html index 71a6171..80bf247 100644 --- a/static/index.html +++ b/static/index.html @@ -92,7 +92,7 @@
-
+
diff --git a/static/scripts/grapher.js b/static/scripts/grapher.js index 9c9a4f9..2474bcb 100644 --- a/static/scripts/grapher.js +++ b/static/scripts/grapher.js @@ -307,7 +307,7 @@ var _canvas = params.canvas; var _columns = {}; var _data = {}; - var _range = new Range(params.range.min || -1.0, params.range.max || 1.0); + var _range = new Range(-1.0, 1.0); var _steps = params.steps || 20; var _useLocalScale = params.useLocalScale || false; var _displayType = params.displayType || 'density'; @@ -320,7 +320,7 @@ for (var name in columns) { var column = columns[name]; for (var i = 0, count = column.hints.length; i < count; ++i) { - column.hints[i].rating = column.hints[i].stats[statKey]; + column.hints[i].rating = column.hints[i][statKey]; } } } diff --git a/static/scripts/search.js b/static/scripts/search.js index 9799874..7976787 100644 --- a/static/scripts/search.js +++ b/static/scripts/search.js @@ -63,7 +63,6 @@ function onSearch() { _ctx.query = { features: _ctx.query.features || {}, - range: {min: -1.0, max: 1.0}, profile: getProfile(), walkingDist: parseFloat($('#walkingDist').val()), minScore: parseFloat($('#minScore').val()), @@ -83,7 +82,6 @@ _ctx.grapher = new grapher.Grapher({ canvas: new Snap('#svg'), steps: _ctx.query.hintSteps, - range: _ctx.query.range, onValueChanged: onAdjust, displayType: $('#displayType').val(), useLocalScale: $('#useLocalScale').is(':checked') @@ -132,21 +130,21 @@ } _ctx.grapher.setColumns(columns); - outputMatches(results.items, results.count); + outputMatches(results.records, results.count); } - function outputMatches(results, count) { - var searchResultCnt = String(results.length); - if (results.length < count) { + function outputMatches(records, count) { + var searchResultCnt = String(records.length); + if (records.length < count) { searchResultCnt += ' of ' + count; } $('#resultCount').text(searchResultCnt); var template = Handlebars.compile($('#template').html()); - $('#results').empty(); - $('#results').append(template({results: results})); + $('#records').empty(); + $('#records').append(template({records: records})); - if (results.length === 0) { + if (records.length === 0) { $('#resultPanel').slideUp(); } else {