summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-09-21 16:11:28 +0300
committerAlon Levy <alon@pobox.com>2014-09-21 16:11:31 +0300
commit91d4155f0460a81e01b7a38df09afbff9af50b33 (patch)
tree9b0f88528c7741fce9e21fdb257a2ff55335e86d /scripts
parentaf27835be74279fe894318fe65d097ddff7384b0 (diff)
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).
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rhizicore.js4
1 files changed, 2 insertions, 2 deletions
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)