зеркало из https://github.com/mozilla/lightbeam.git
fix minor bugs in filtering
This commit is contained in:
Родитель
d6bff04962
Коммит
ed057e06b8
|
@ -354,7 +354,7 @@ aggregate.filters = {
|
|||
}
|
||||
};
|
||||
|
||||
var currentFilter = aggregate.filters[localStorage.currentFilter || 'last24Hours'];
|
||||
var currentFilter = aggregate.filters[localStorage.currentFilter || 'daily'];
|
||||
|
||||
function switchFilter(name){
|
||||
console.log('switchFilter(' + name + ')');
|
||||
|
|
|
@ -22,6 +22,16 @@ graph.on('init', onInit);
|
|||
graph.on('remove', onRemove);
|
||||
graph.on('reset', onReset);
|
||||
|
||||
/* for Highlighting and Colouring -------------------- */
|
||||
|
||||
var highlight = {};
|
||||
highlight.visited = true;
|
||||
highlight.neverVisited = true;
|
||||
highlight.connections = true;
|
||||
highlight.cookies = false;
|
||||
highlight.watched = false;
|
||||
highlight.blocked = false;
|
||||
|
||||
function onUpdate(){
|
||||
// new nodes, reheat graph simulation
|
||||
if (force){
|
||||
|
@ -171,7 +181,7 @@ function initGraph(){
|
|||
}else{
|
||||
this.classList.remove('highlighted');
|
||||
}
|
||||
if (d.cookieCount > 0 && highlight.cookies){
|
||||
if (d.cookieCount && highlight.cookies){
|
||||
this.classList.add('coloured');
|
||||
}else{
|
||||
this.classList.remove('coloured');
|
||||
|
@ -279,15 +289,6 @@ function resetCanvas(){
|
|||
|
||||
|
||||
|
||||
/* for Highlighting and Colouring -------------------- */
|
||||
|
||||
var highlight = {};
|
||||
highlight.visited = true;
|
||||
highlight.neverVisited = true;
|
||||
highlight.connections = true;
|
||||
highlight.cookies = false;
|
||||
highlight.watched = false;
|
||||
highlight.blocked = false;
|
||||
var graphLegend = document.querySelector(".graph-footer");
|
||||
|
||||
legendBtnClickHandler(graphLegend);
|
||||
|
|
Загрузка…
Ссылка в новой задаче