()
| 964 | }; |
| 965 | |
| 966 | function initTutorial() { |
| 967 | if (state.tutorial == null || state.tutorial === '' || state.hideText) { |
| 968 | return; |
| 969 | } |
| 970 | // Remove all other text. |
| 971 | d3.selectAll("article div.l--body").remove(); |
| 972 | let tutorial = d3.select("article").append("div") |
| 973 | .attr("class", "l--body"); |
| 974 | // Insert tutorial text. |
| 975 | d3.html(`tutorials/${state.tutorial}.html`, (err, htmlFragment) => { |
| 976 | if (err) { |
| 977 | throw err; |
| 978 | } |
| 979 | tutorial.node().appendChild(htmlFragment); |
| 980 | // If the tutorial has a <title> tag, set the page title to that. |
| 981 | let title = tutorial.select("title"); |
| 982 | if (title.size()) { |
| 983 | d3.select("header h1").style({ |
| 984 | "margin-top": "20px", |
| 985 | "margin-bottom": "20px", |
| 986 | }) |
| 987 | .text(title.text()); |
| 988 | document.title = title.text(); |
| 989 | } |
| 990 | }); |
| 991 | } |
| 992 | |
| 993 | function drawDatasetThumbnails() { |
| 994 | function renderThumbnail(canvas, dataGenerator) { |
no outgoing calls
no test coverage detected
searching dependent graphs…