diff --git a/js/createLegend.js b/js/createLegend.js
index 49ba512..686a76d 100644
--- a/js/createLegend.js
+++ b/js/createLegend.js
@@ -49,7 +49,7 @@ function createLegend() {
}//createLegend
-function legendHover(d) {
+function legendHover(event, d) {
chosenColor = hexLocation[hexKey[d]];
@@ -63,7 +63,7 @@ function legendHover(d) {
}//legendHover
-function legendHoverOut() {
+function legendHoverOut(event, d) {
//If the search is active, only bring back those rects from the artist
//Else bring back all rects
diff --git a/js/dive_network.js b/js/dive_network.js
index 9571c07..96bfa62 100644
--- a/js/dive_network.js
+++ b/js/dive_network.js
@@ -65,15 +65,15 @@ d3.json("data/network.json", function(error, graph) {
.on("start", dragstarted)
.on("drag", dragged)
.on("end", dragended))
- .on("mouseover", function(d) {
+ .on("mouseover", function(event, d) {
div.transition()
.duration(200)
.style("opacity", .9);
- div .html(""+d.site+"")
- .style("left", (d3.event.pageX) + "px")
- .style("top", (d3.event.pageY - 28) + "px");
+ div.html(""+d.site+"")
+ .style("left", (event.pageX) + "px")
+ .style("top", (event.pageY - 28) + "px");
})
- .on("mouseout", function(d) {
+ .on("mouseout", function(event, d) {
div.transition()
.duration(500)
.style("opacity", 0);
@@ -108,19 +108,19 @@ d3.json("data/network.json", function(error, graph) {
}
});
-function dragstarted(d) {
- if (!d3.event.active) simulation.alphaTarget(0.3).restart();
+function dragstarted(event, d) {
+ if (!event.active) simulation.alphaTarget(0.3).restart();
d.fx = d.x;
d.fy = d.y;
}
-function dragged(d) {
- d.fx = d3.event.x;
- d.fy = d3.event.y;
+function dragged(event, d) {
+ d.fx = event.x;
+ d.fy = event.y;
}
-function dragended(d) {
- if (!d3.event.active) simulation.alphaTarget(0);
+function dragended(event, d) {
+ if (!event.active) simulation.alphaTarget(0);
d.fx = null;
d.fy = null;
}