diff options
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -3,10 +3,10 @@ <head> <meta charset="UTF-8"> <title></title> - <link rel="stylesheet" href="index.css"> <link rel="stylesheet" href="dep/material-icons.css"> <link rel="stylesheet" href="dep/material.deep_purple-blue.min.css"> <link rel="stylesheet" href="dep/emojione.min.css"> + <link rel="stylesheet" href="index.css"> </head> <body> <script src="dep/d3.js" type="text/javascript"></script> @@ -61,8 +61,9 @@ .style("height", parseInt(window.innerHeight) + "px"); d3.selectAll(".scale") .style("font-size", function() { - var lines = d3.select(this).selectAll("p")[0].length; // TODO a bit specific, may not work in all cases - return Math.min(this.clientWidth/10, this.clientHeight/lines*(1.5)) + "px"; // TODO replace by line height? + var lines = d3.select(this).selectAll("p")[0].length+1; // TODO a bit specific, may not work in all cases + if (lines<=1) return this.clientWidth/10 + "px"; + return this.clientHeight/10 + "px"; }); var scalePicture = function(d, i, me, extraRatio) { // "extraRatio" might scale vertically @@ -72,7 +73,7 @@ winH = window.innerHeight, picW = me.node().naturalWidth, picH = me.node().naturalHeight, - ratioH = 0.75*extraRatio, ratioW = 0.9; + ratioH = 0.7*extraRatio, ratioW = 0.7; if ((winW*ratioW)/picW > (winH*ratioH)/picH) { me.style("height", winH*ratioH + "px"); me.style("width", "auto"); @@ -82,7 +83,7 @@ } }; d3.selectAll(".scalepic").each(scalePicture); - d3.selectAll(".scalepic-half").each(function(d, i) { scalePicture(d, i, this, 0.5); }); + d3.selectAll(".scalepic-half").each(function(d, i) { scalePicture(d, i, this, 0.45); }); }; window.addEventListener("resize", sizeSlides); @@ -93,7 +94,7 @@ }); </script> - <div id="impress"> + <div id="impress" data-width="800" data-height="600"> <!-- TODO Fortschrittsbalken unten? --> <div class="step slide" data-x="0" data-y="0" data-z="5000"> <h1>Künstliche neuronale Netze</h1> @@ -175,7 +176,6 @@ <div class="step slide" data-x="4000" data-y="0" data-z="5000"> <h1>Das Problem – Die Boston-Häuserdatenreihe</h1> - <!-- TODO overflows right in 800x600 --> <div class="center"> <p class="emoji scale">:homes:</p> <table id="boston-example"></table> @@ -193,7 +193,7 @@ }); // TODO highlight medv table.append("tbody"); - for(c=0; c<8; c++) { + for(c=0; c<5; c++) { var row = Math.floor(Math.random()*bostonset.length()); var tr = table.select("tbody").append("tr"); bostonset.rawData(row).forEach(function(val) { |
