From 91d4155f0460a81e01b7a38df09afbff9af50b33 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 21 Sep 2014 16:11:28 +0300 Subject: rhizicore: set minimal svg size to (1000,1000) Works around a problem where you load rhizi with a small window size and then enlarge it, since we don't dynamically change the svg size (and it is fixed instead of filling a parent div or such) we lose access to a lot of the screen (i.e. can't drag nodes there, can't see anything there, etc). --- scripts/rhizicore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 715c8475..720a3212 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -374,8 +374,8 @@ function myGraph(el) { zoomObject = d3.behavior.zoom().scaleExtent([0.1, 3]).on("zoom", zoom); vis = this.vis = d3.select(el).append("svg:svg") - .attr("width", w * 5) - .attr("height", h ) + .attr("width", Math.max(w, 1000) * 5) + .attr("height", Math.max(h, 1000) ) .attr("pointer-events", "all") .append("g") .call(zoomObject) -- cgit v1.3.1