зеркало из https://github.com/mozilla/lightbeam.git
[Issue #352] fixed broken toggle buttons on Graph View; other minor bug fixes
This commit is contained in:
Родитель
3196b2dc32
Коммит
4a2343cc7a
|
@ -177,13 +177,15 @@ function initGraph(){
|
|||
// `this` is the DOM node
|
||||
this.setAttribute('transform', 'translate(' + d.x + ',' + d.y + ') scale(' + (1 + .05 * d.weight) + ')');
|
||||
this.setAttribute('data-timestamp', d.lastAccess.toISOString());
|
||||
// check to see if it's a visited node or not
|
||||
if (d.visitedCount){
|
||||
this.classList.add('visitedYes');
|
||||
this.classList.remove('visitedNo');
|
||||
// this.classList.remove('visitedNo');
|
||||
}else{
|
||||
this.classList.add('visitedNo');
|
||||
this.classList.remove('visitedYes');
|
||||
// this.classList.remove('visitedYes');
|
||||
}
|
||||
// check to see if it should be highlighted
|
||||
if (d.visitedCount && highlight.visited){
|
||||
this.classList.add('highlighted');
|
||||
}else if((!d.visitedCount) &&highlight.neverVisited){
|
||||
|
@ -191,6 +193,14 @@ function initGraph(){
|
|||
}else{
|
||||
this.classList.remove('highlighted');
|
||||
}
|
||||
// check to see if it's a watched site
|
||||
if ( Object.keys(userSettings).indexOf(d.name) > -1 && userSettings[d.name].contains("watch") ){
|
||||
this.classList.add("watched");
|
||||
}
|
||||
// check to see if it's a blocked site
|
||||
if ( Object.keys(userSettings).indexOf(d.name) > -1 && userSettings[d.name].contains("block") ){
|
||||
this.classList.add("blocked");
|
||||
}
|
||||
});
|
||||
var endDraw = Date.now();
|
||||
draws.push(endDraw - lastTick);
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
<div class="section-header all-cap-header">VISUALIZATION</div>
|
||||
<div class="btn_group visualization" role="menu">
|
||||
<div data-list class="dropdown_options">
|
||||
<a data-value="Graph" href="" role="menuitem" tabIndex="1" aria-label="Graph Visualization">
|
||||
<a data-value="Graph" role="menuitem" tabIndex="1" aria-label="Graph Visualization">
|
||||
<img src="image/collusion_icon_graph.png" />graph
|
||||
</a>
|
||||
<a data-value="Clock" href="" role="menuitem" tabIndex="2" aria-label="Clock Visualization">
|
||||
<a data-value="Clock" role="menuitem" tabIndex="2" aria-label="Clock Visualization">
|
||||
<img src="image/collusion_icon_clock.png" />clock
|
||||
</a>
|
||||
<a data-value="List" href="" role="menuitem" tabIndex="3" aria-label="List. Display data in tabular format.">
|
||||
<a data-value="List" role="menuitem" tabIndex="3" aria-label="List. Display data in tabular format.">
|
||||
<img src="image/collusion_icon_list.png" />list
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -134,6 +134,7 @@ document.querySelector('.reset-data').addEventListener('click', function(){
|
|||
allConnections = [];
|
||||
addon.emit('reset');
|
||||
aggregate.emit('reset');
|
||||
userSettings = {};
|
||||
localStorage.clear();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче