Co-author visualization: Change cursor type when hovering over link
This commit is contained in:
parent
e80efb863a
commit
6481558597
2 changed files with 6 additions and 2 deletions
|
@ -201,12 +201,14 @@ $(document).ready(function(){
|
||||||
if (opacity > .5) {
|
if (opacity > .5) {
|
||||||
var chordInfoDiv = d3.select('#chord-info-div');
|
var chordInfoDiv = d3.select('#chord-info-div');
|
||||||
chordInfoDiv.style('display', 'none');
|
chordInfoDiv.style('display', 'none');
|
||||||
|
$('#chord').css('cursor', 'default');
|
||||||
} else {
|
} else {
|
||||||
var hoverEvent = d3.event;
|
var hoverEvent = d3.event;
|
||||||
var topPos = hoverEvent.pageY - 60;
|
var topPos = hoverEvent.pageY - 60;
|
||||||
var leftPos = hoverEvent.pageX + 10;
|
var leftPos = hoverEvent.pageX + 10;
|
||||||
|
|
||||||
var chord = d3.select('#chord').node();
|
var chord = d3.select('#chord').node();
|
||||||
|
$('#chord').css('cursor', 'pointer');
|
||||||
var chordInfoDiv = d3.select('#chord-info-div');
|
var chordInfoDiv = d3.select('#chord-info-div');
|
||||||
var hoverMsg = labels[i] + "<br/>";
|
var hoverMsg = labels[i] + "<br/>";
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
@ -241,7 +243,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
function chord_click() {
|
function chord_click() {
|
||||||
return function (g, i) {
|
return function (g, i) {
|
||||||
if (i > 0) {
|
if (i >= 0) {
|
||||||
window.location.href = getWellFormedURLs(uris[i], "profile");
|
window.location.href = getWellFormedURLs(uris[i], "profile");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -205,12 +205,14 @@ $(document).ready(function(){
|
||||||
if (opacity > .5) {
|
if (opacity > .5) {
|
||||||
var chordInfoDiv = d3.select('#chord-info-div');
|
var chordInfoDiv = d3.select('#chord-info-div');
|
||||||
chordInfoDiv.style('display', 'none');
|
chordInfoDiv.style('display', 'none');
|
||||||
|
$('#chord').css('cursor', 'default');
|
||||||
} else {
|
} else {
|
||||||
var hoverEvent = d3.event;
|
var hoverEvent = d3.event;
|
||||||
var topPos = hoverEvent.pageY - 60;
|
var topPos = hoverEvent.pageY - 60;
|
||||||
var leftPos = hoverEvent.pageX + 10;
|
var leftPos = hoverEvent.pageX + 10;
|
||||||
|
|
||||||
var chord = d3.select('#chord').node();
|
var chord = d3.select('#chord').node();
|
||||||
|
$('#chord').css('cursor', 'pointer');
|
||||||
var chordInfoDiv = d3.select('#chord-info-div');
|
var chordInfoDiv = d3.select('#chord-info-div');
|
||||||
var hoverMsg = labels[i] + "<br/>";
|
var hoverMsg = labels[i] + "<br/>";
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
@ -245,7 +247,7 @@ $(document).ready(function(){
|
||||||
|
|
||||||
function chord_click() {
|
function chord_click() {
|
||||||
return function (g, i) {
|
return function (g, i) {
|
||||||
if (i > 0) {
|
if (i >= 0) {
|
||||||
window.location.href = getWellFormedURLs(uris[i], "profile");
|
window.location.href = getWellFormedURLs(uris[i], "profile");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue