|
|
@ -31,7 +31,7 @@ $(function() { |
|
|
|
} |
|
|
|
|
|
|
|
var unhighlightCSS = { |
|
|
|
'opacity': "0.6" |
|
|
|
'opacity': "0.7" |
|
|
|
// 'fontWeight': 'normal',
|
|
|
|
// 'backgroundColor': '#ffffff'
|
|
|
|
} |
|
|
@ -64,7 +64,7 @@ $(function() { |
|
|
|
for (var i=0; i<nodes.length; i++) { |
|
|
|
console.log(nodes[i]); |
|
|
|
var $node = getNode(nodes[i]); |
|
|
|
$node.css(highlightCSS); |
|
|
|
$node.highlightNode(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -84,7 +84,7 @@ $(function() { |
|
|
|
for (var i=0; i<nodes.length; i++) { |
|
|
|
console.log(nodes[i]); |
|
|
|
var $node = getNode(nodes[i]); |
|
|
|
$node.css(unhighlightCSS); |
|
|
|
$node.unhighlightNode(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -150,7 +150,7 @@ $(function() { |
|
|
|
for (var i=0; i<$texts.length;i++) { |
|
|
|
var $t = $texts[i]; |
|
|
|
if ($t.data("type") == typ) { |
|
|
|
$t.css(highlightCSS); |
|
|
|
$t.highlightNode(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -172,7 +172,7 @@ $(function() { |
|
|
|
for (var i=0; i<$texts.length;i++) { |
|
|
|
var $t = $texts[i]; |
|
|
|
if ($t.data("type") == typ) { |
|
|
|
$t.css(unhighlightCSS); |
|
|
|
$t.unhighlightNode(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -238,3 +238,27 @@ jQuery.fn.unhighlightLine = function() { |
|
|
|
this.find('line, polyline, path').css({'stroke': '#666666'}); |
|
|
|
this.find("path").css({'strokeDasharray': '4'}); |
|
|
|
} |
|
|
|
|
|
|
|
jQuery.fn.highlightNode = function() { |
|
|
|
this.css({'opacity': '1.0'}); |
|
|
|
if (this.data("type") == 'rivalgroup') { |
|
|
|
this.css({'fontWeight': 'bold'}); |
|
|
|
} else { |
|
|
|
var prev = this.prev(); |
|
|
|
if (prev.is('rect')) { |
|
|
|
this.prev().css({'fill': '#FAFF3E'}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
jQuery.fn.unhighlightNode = function() { |
|
|
|
this.css({'opacity': '0.7'}); |
|
|
|
if (this.data("type") == 'rivalgroup') { |
|
|
|
this.css({'fontWeight': 'normal'}); |
|
|
|
} else { |
|
|
|
var prev = this.prev(); |
|
|
|
if (prev.is('rect')) { |
|
|
|
this.prev().css({'fill': '#ffffff'}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|