@@ -669,7 +669,8 @@ define(['d3'], function () {
669669 renderTags : function ( ) {
670670 var view = this ,
671671 tagData = this . _parseTagData ( ) ,
672- existingTags , newTags ;
672+ existingTags , newTags ,
673+ currentBranch = this . currentBranch ;
673674
674675 existingTags = this . tagBox . selectAll ( 'g.branch-tag' )
675676 . data ( tagData , function ( d ) { return d . name ; } ) ;
@@ -707,6 +708,9 @@ define(['d3'], function () {
707708 } else if ( d . name . toUpperCase ( ) === 'HEAD' ) {
708709 classes += ' head-tag' ;
709710 }
711+ if ( d . name == currentBranch ) {
712+ classes += " current-branch"
713+ }
710714 return classes ;
711715 } ) ;
712716
@@ -737,6 +741,19 @@ define(['d3'], function () {
737741 return commit . cx ;
738742 } ) ;
739743
744+ this . tagBox . selectAll ( 'g.branch-tag' ) . attr ( 'class' , function ( d ) {
745+ var cls = d3 . select ( this ) . attr ( 'class' ) . split ( " " ) ,
746+ currentBranchIndex = cls . indexOf ( 'current-branch' ) ;
747+ if ( d . name == currentBranch ) {
748+ if ( currentBranchIndex < 0 ) {
749+ cls . push ( 'current-branch' ) ;
750+ }
751+ } else if ( currentBranchIndex >= 0 ) {
752+ cls . splice ( currentBranchIndex , 1 ) ;
753+ }
754+ return cls . join ( ' ' ) ;
755+ } ) ;
756+
740757 this . _markBranchlessCommits ( ) ;
741758 } ,
742759
0 commit comments