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> </div>
<!-- query output --> <!-- query output -->
<div> <div id="output" style="display: none;">
<!-- semantic tweaker --> <!-- semantic tweaker -->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">

View File

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