1

Fade in grapher when done

This commit is contained in:
Alex Yatskov 2014-11-08 12:31:57 +09:00
parent 3620d6a0a1
commit 2573da5ad5
2 changed files with 6 additions and 10 deletions

View File

@ -84,7 +84,7 @@
</div>
<!-- query output -->
<div>
<div id="output" style="display: none;">
<!-- semantic tweaker -->
<div class="panel panel-default">
<div class="panel-heading">

View File

@ -87,15 +87,9 @@
}
function onSearch() {
var keyword = $('#keywordsToSearch').val();
var features = {};
for (var feature in ctx.keywords[keyword]) {
features[feature] = 1.0;
}
var keyword = $('#keywordsToSearch').val();
var query = {
features: features,
features: ctx.keywords[keyword],
range: { min: -1.0, max: 1.0 },
minScore: parseFloat($('#minScore').val()),
hintSteps: parseInt($('#hintSteps').val()),
@ -122,7 +116,6 @@
saveSnapshot(results);
outputMatches(results.items, results.count);
$('#query').text(keyword);
$('#useLocalScale').click(function() {
var useLocalScale = $('#useLocalScale').is(':checked');
ctx.grapher.setUseLocalScale(useLocalScale);
@ -131,6 +124,9 @@
var useRelativeScale = $('#useRelativeScale').is(':checked');
ctx.grapher.setUseRelativeScale(useRelativeScale);
});
$('#query').text(keyword);
$('#output').fadeIn();
});
}