Commit 276d756ac5e7ed174c2ece1946c5e280ed775d1a

Authored by lucvic
1 parent 4f261647

Fixed: Dataset preview iframe was partially hidden in Safari

datalets/datasetexplorer-datalet/js/buildtreemap.js
... ... @@ -96,8 +96,7 @@ function build(root, place_holder) {
96 96 c.depth = d.depth + 1;
97 97 c.color = c.depth < 2
98 98 ? d3.scale.ordinal().domain(d3.range(d._children.length)).range(["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"])(i++)
99   - //? interpolate(0, d._children.length, i++)
100   - : d.color; //d3.rgb(d.color).brighter(.5);
  99 + : d.color;
101 100 layout(c);
102 101 });
103 102 }
... ... @@ -137,7 +136,6 @@ function build(root, place_holder) {
137 136 g.append("text")
138 137 .attr("dy", ".75em")
139 138 .text(function(d) { return (d._children) ? d.name : ''; })
140   - //.style("font-size", function(d) { return Math.min(16, (d.dx - 8) / this.getComputedTextLength() * 16) + "px"; })
141 139 .call(text)
142 140 ;
143 141  
... ... @@ -146,8 +144,6 @@ function build(root, place_holder) {
146 144 transitioning = true;
147 145  
148 146 if (dataletContainer) {
149   - //svg.select("foreignObject")
150   - //svg.remove(dataletContainer);
151 147 dataletContainer.remove();
152 148 dataletContainer = null;
153 149 }
... ... @@ -187,8 +183,8 @@ function build(root, place_holder) {
187 183 var pageurl = dataurl.replace(/\/download\/.*/, '');
188 184 dataletContainer = svg
189 185 .append("foreignObject")
190   - .attr("width", 480)
191   - .attr("height", 500)
  186 + .attr("width", root.dx)
  187 + .attr("height", root.dy - root.y)
192 188 .append("xhtml:body")
193 189 .html('<iframe src="'+pageurl+'" width="'+root.dx+'" height="'+root.dy+'"></iframe>');
194 190  
... ...