Permalink
Browse files

Bugfix: Center text was reverting back to the closest arc/bus with

every update. Fixed to stay linked to current highlighted arc/bus.
  • Loading branch information...
1 parent bdece24 commit c805cf4fc756b92f45f442c79c95f3a0dcc1da36 @cmdoptesc committed Aug 26, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/mymuni-d3.js
View
@@ -383,7 +383,10 @@ var d3methods = {
// loop below is to see if there is a highlighted arc
var hasHighlight = false;
gArc.select("path.arc-path").each(function(d){
- if( this.classList.contains('highlighted') || this.classList.contains('highlighted2') ) { hasHighlight = true; }
+ if( this.classList.contains('highlighted') || this.classList.contains('highlighted2') ) {
+ hasHighlight = true;
+ centerTextData = [d3.select(this).datum()];
+ }
});
// re-colors the arcs, if there is no highlighted arc (from above), highlight the first one

0 comments on commit c805cf4

Please sign in to comment.