Skip to content

Commit

Permalink
Links In Order (all at once) finished
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Palay committed Sep 21, 2019
1 parent 51cfcf7 commit d208290
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions linksInOrder.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@
return d.portal.y;
})
).nice();

for (let i = 0; i < data.length; i++) {
const datum = data[i];
console.log(data)
for (let i = 0; i < data.betterPortalList .length; i++) {
const datum = data.betterPortalList[i];
console.log(datum, i)

let svg = container.append("svg");

Expand Down Expand Up @@ -179,16 +180,18 @@
.text(d => d.portal.title);

d3.selectAll("circle")
.filter((data, i) => i <= points)
.filter((data, index) => index <= i)
.each((d, ic, arr) => {

tmpLinks = ic == 0 ? d.linksTo : d.linksFrom.slice(1)
linkStr += `${ic}. ${d.portal.title}\n`
tmpLinks.forEach((link, i) => { linkStr += ic == 0 ? "" : ` ${i}. ${link.dest.title}\n` })
//linkStr += `${ic}. ${d.portal.title}\n`
//tmpLinks.forEach((link, i) => { linkStr += ic == 0 ? "" : ` ${i}. ${link.dest.title}\n` })


// add the lines to the svg
d3.select(".links")
svg
.append("g")
.attr("class", "links")
.selectAll("lines")
.data(tmpLinks)
.enter()
Expand Down Expand Up @@ -234,7 +237,7 @@
});

// add the lines to the svg
d3.select(".links")
svg.select(".links")
.selectAll("lines")
.data(tmpLinks)
.enter()
Expand All @@ -250,7 +253,7 @@

d3.select("#currentStep").text(ic);
});
d3.select("#listOfLinks").html(converter.makeHtml(linkStr));
//d3.select("#listOfLinks").html(converter.makeHtml(linkStr));
scrollToBottom("StepsDiv");
} // Finishes Change Function

Expand Down

0 comments on commit d208290

Please sign in to comment.