Prtksxna has uploaded a new change for review.
https://gerrit.wikimedia.org/r/151579
Change subject: Remove hover state if no project is defined in targeted graphs
......................................................................
Remove hover state if no project is defined in targeted graphs
Change-Id: I2970e910259f442b46f327de4937b2dbdad511df
---
M source/javascripts/content.js
1 file changed, 4 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/TransparencyReport
refs/changes/79/151579/1
diff --git a/source/javascripts/content.js b/source/javascripts/content.js
index 4072000..4459c32 100644
--- a/source/javascripts/content.js
+++ b/source/javascripts/content.js
@@ -104,14 +104,6 @@
labels
.enter()
.append( 'text' )
- .on( 'click', function ( d ) {
- if ( ds.filters[ groupBy ] === d.key ) {
- delete ds.filters[ groupBy ];
- } else {
- ds.filters[ groupBy ] = d.key;
- }
- dispatch.filter();
- } )
.attr( 'x', '-100' )
.style( 'opacity', '0' )
.attr( 'class', 'blue_bars' );
@@ -280,7 +272,7 @@
// Labels
- var labels = graph.selectAll( 'text.targeted' ).data(
data, function ( d ) {
+ var labels = graph.selectAll( 'text' ).data( data,
function ( d ) {
return d.key.split( '*' )[0];
} )
labels
@@ -293,7 +285,9 @@
} )
.attr( 'x', '-100' )
.style( 'opacity', '0' )
- .attr( 'class', 'targeted' );
+ .classed( 'targeted', function ( d ) {
+ return d.url !== "";
+ } );
labels
.html( function ( d ) {
@@ -452,14 +446,6 @@
labels
.enter()
.append( 'text' )
- .on( 'click', function ( d ) {
- if ( ds.filters[ groupBy ] === d.key ) {
- delete ds.filters[ groupBy ];
- } else {
- ds.filters[ groupBy ] = d.key;
- }
- dispatch.filter();
- } )
.attr( 'x', '-100' )
.style( 'opacity', '0' )
.attr( 'class', 'blue_bars' );
--
To view, visit https://gerrit.wikimedia.org/r/151579
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2970e910259f442b46f327de4937b2dbdad511df
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/TransparencyReport
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits