Skip to content

Commit

Permalink
now with added fun of having the pointer pos marked on the axis
Browse files Browse the repository at this point in the history
  • Loading branch information
penma committed Jun 21, 2011
1 parent 22d034b commit 5419a84
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ircvis
Expand Up @@ -166,13 +166,21 @@ $(window).scroll(function () {
$("#yaxis").css({ left : $(this).scrollLeft() }); $("#yaxis").css({ left : $(this).scrollLeft() });
}); });
$(window).mousemove(function (e) {
$("#xmarker").css({ left : e.clientX });
$("#ymarker").css({ top : e.clientY });
});
$(function () { $(function () {
$("body").append($("<div id=\"data\" />").append($("<img>").attr("src", i_d))); $("body").append($("<div id=\"data\" />").append($("<img>").attr("src", i_d)));
$("body").append($("<div id=\"xaxis\" />").append($("<img>").attr("src", i_x))); $("body").append($("<div id=\"xaxis\" />").append($("<img>").attr("src", i_x)));
$("body").append($("<div id=\"yaxis\" />").append($("<img>").attr("src", i_y))); $("body").append($("<div id=\"yaxis\" />").append($("<img>").attr("src", i_y)));
$("#xaxis, #yaxis, #data").css({ position : "absolute", top : "50px", left : "50px", }); $("#xaxis, #yaxis, #data").css({ position : "absolute", top : "50px", left : "50px", });
$("body").append($("<div id=\"xmarker\" />").css({ position : "fixed", top : 0, width : 1, height : 50, backgroundColor : "black" }));
$("body").append($("<div id=\"ymarker\" />").css({ position : "fixed", left : 0, width : 50, height : 1, backgroundColor : "black" }));
$(window).scroll(); $(window).scroll();
}); });
Expand Down

0 comments on commit 5419a84

Please sign in to comment.