diff options
author | Freeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace> | 2013-05-15 03:35:20 +1200 |
---|---|---|
committer | Freeyorp <TheFreeYorp@NOSPAM.G.m.a.i.l.replace> | 2013-05-15 03:35:20 +1200 |
commit | 299036b46f96962ae51169413d0637a74d9f8c9f (patch) | |
tree | 7d477d87922da3268f9e3284debe51f36dfd1ad4 | |
parent | b833e0099742c523144bfb585cddb73f960dc3ea (diff) | |
download | manavis-299036b46f96962ae51169413d0637a74d9f8c9f.tar.gz manavis-299036b46f96962ae51169413d0637a74d9f8c9f.tar.bz2 manavis-299036b46f96962ae51169413d0637a74d9f8c9f.tar.xz manavis-299036b46f96962ae51169413d0637a74d9f8c9f.zip |
Compatability fixes
This is by no means even close to comprehensive (legacy compatability for
determining browser width is a total mess in and of itself).
However, this is enough for manavis to work on recent versions of Firefox.
It's not quite as fast as chromium, but it is entirely workable.
Older versions aren't really worth testing, as the entire application is very
js intensive.
-rw-r--r-- | public/js/mv/chart.js | 2 | ||||
-rw-r--r-- | public/js/util/trellis-chart.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/public/js/mv/chart.js b/public/js/mv/chart.js index d2af480..1d85f2b 100644 --- a/public/js/mv/chart.js +++ b/public/js/mv/chart.js @@ -3,7 +3,7 @@ var mv = function(mv) { mv.charts = {}; var thinWidth = 250; var medWidth = 400; - var wideWidth = Math.max(700, document.width - thinWidth - medWidth); + var wideWidth = Math.max(700, document.documentElement.clientWidth - thinWidth - medWidth); mv.charter = function() { var charter = {}; charter.init = function() { diff --git a/public/js/util/trellis-chart.js b/public/js/util/trellis-chart.js index cb7c8f1..31cece6 100644 --- a/public/js/util/trellis-chart.js +++ b/public/js/util/trellis-chart.js @@ -30,7 +30,7 @@ function trellisChart(anchor, monoGroups) { var _chart = function() { if (g.empty()) { /* Make stuff! */ - var svg = anchor.append("svg").attr("height", 400).attr("class", "mv-chart"); + var svg = anchor.append("svg").attr("height", 400).attr("width", 400).attr("class", "mv-chart"); /* Group of dimension labels. */ var dimLabelsG = svg .append("g") |