Skip to content

Commit

Permalink
Further bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieparkinson committed May 5, 2016
1 parent 620aeed commit d246aa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions js/fig1.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var h_stack = 90; // SVG canvas size
var w_stack = 580;
var y_origin = 40; // What we will use as the origin for the y-axis
var y_origin = 44; // What we will use as the origin for the y-axis

var w_tip = 35; // Tooltip dimensions
var h_tip = 17;
Expand Down Expand Up @@ -28,7 +28,7 @@ var labels = svg.append("g").attr("id", "circ-labels").selectAll("text")
.data(circ_dat).enter().append("text").attr("class", "circ-label");
var tooltip = svg.append("g").attr("id", "tooltip")
.style("opacity", 0)
.attr("transform", gpos(-w_tip - 1, y_origin + h_tip));
.attr("transform", gpos(-w_tip - 1, 0));
tooltip.append("rect")
.attr("width", w_tip)
.attr("height", h_tip)
Expand Down Expand Up @@ -81,7 +81,7 @@ circs.attr("cx", function(val, i) { return circX(i); })
d3.select("#tooltip text").html(dec2bin(i)); // Change tooltip text to binary representation of this bit

d3.select("#tooltip")
.attr("transform", gpos(circX(i) - 0.5*w_tip, y_origin + h_tip)) // Move tooltip
.attr("transform", gpos(circX(i) - 0.5*w_tip, 0)) // Move tooltip
.transition()
.duration(100)
.style("opacity", 1); // Show tooltip
Expand Down
5 changes: 3 additions & 2 deletions js/graph-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ function graphScroll() {
var isBelow1 = pageYOffset > (belowStart - 0.3*window.innerHeight);
if (isBelow != isBelow1){
isBelow = isBelow1
graph.classed('graph-scroll-below', isBelow)
if (isBelow) {
resize()
graph.style("right", null);
}
graph.classed('graph-scroll-below', isBelow)
}
var isFixed1 = !isBelow && pageYOffset > (containerStart - 0.3*window.innerHeight)
if (isFixed != isFixed1){
Expand All @@ -46,7 +47,7 @@ function graphScroll() {
}

// My additions to move the <ol> of algorithm steps
var containerTopMovey = pageYOffset - containerStart + 0.8*window.innerHeight;
var containerTopMovey = pageYOffset - containerStart + 0.7*window.innerHeight;

var moveLeft = slideOffset;
var moveVelocity = 0.8;
Expand Down

0 comments on commit d246aa5

Please sign in to comment.