From 71d6973d350595ffbe29f5d791ec8972ccc23416 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 8 Apr 2016 20:01:29 +0200 Subject: optimize further for 800x600 --- index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 5a1b913..c649d6b 100644 --- a/index.html +++ b/index.html @@ -3,10 +3,10 @@ - + @@ -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 @@ }); -
+

Künstliche neuronale Netze

@@ -175,7 +176,6 @@

Das Problem – Die Boston-Häuserdatenreihe

-

:homes:

@@ -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) { -- cgit v1.3.1