diff --git a/kallithea/public/js/graph.js b/kallithea/public/js/graph.js --- a/kallithea/public/js/graph.js +++ b/kallithea/public/js/graph.js @@ -68,8 +68,9 @@ function BranchRenderer(canvas_id, conte this.canvas.setAttribute('width',canvasWidth); this.canvas.setAttribute('height',content.clientHeight); - // retina version needs to be scaled by 2x then halved via css - if (window.devicePixelRatio) { + // HiDPI version needs to be scaled by 2x then halved via css + // Note: Firefox on OS X fails scaling if the canvas height is more than 32k + if (window.devicePixelRatio && content.clientHeight * window.devicePixelRatio < 32768) { this.canvas.setAttribute('width', canvasWidth * window.devicePixelRatio); this.canvas.setAttribute('height', content.clientHeight * window.devicePixelRatio); this.canvas.style.width = canvasWidth + "px";