lib/public/js/dash.js in batsd-dash-0.3.0 vs lib/public/js/dash.js in batsd-dash-0.3.1
- old
+ new
@@ -32,11 +32,16 @@
var graph = main_el.select('svg');
var view = d3.select('button');
loading.toggle = function(){
- this.style('display', this.style('display') == 'block' ? 'none' : 'block');
+ var action = this.style('display') == 'block';
+
+ //main_el.transition().style('opacity', action ? '1.0' : '1.0').call(function(){
+ main_el.style('display', action ? 'block' : 'none');
+ loading.style('display', action ? 'none' : 'block');
+ //});
};
function set_time_params(){
var map = {};
@@ -45,10 +50,10 @@
LocationHash.set(map);
}
function time_axis_formatter(resp){
- var format = { 600: '%x', 60: '%X', 10: '%X' }[resp.interval];
+ var format = { 600: '%x', 60: '%X', 10: '%X' }[resp.interval] || '%X';
return function(d){
return d3.time.format(format)(new Date(d));
};
}