From 299036b46f96962ae51169413d0637a74d9f8c9f Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Wed, 15 May 2013 03:35:20 +1200 Subject: 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. --- public/js/mv/chart.js | 2 +- 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") -- cgit v1.2.3-60-g2f50