From bc3910c612fe7c59128fc87c6f52d4d1136cc34d Mon Sep 17 00:00:00 2001 From: Phyks Date: Fri, 28 Mar 2014 01:13:17 +0100 Subject: [PATCH] Resize axis on window resize --- timeline.js | 1 + 1 file changed, 1 insertion(+) diff --git a/timeline.js b/timeline.js index 9410cf2..4d8d845 100644 --- a/timeline.js +++ b/timeline.js @@ -199,6 +199,7 @@ window.onresize = function() { old(); if(SVG.g !== false) { SVG.g.setAttribute('transform', 'translate(0, ' + SVG.holder.parentElement.offsetHeight + ') scale(1, -1)'); + SVG.axis.setAttribute('x2', holder.offsetWidth - 13 - SVG.marginRight); [].forEach.call(SVG.holder.querySelectorAll('.point, .line'), function(el) { el.parentElement.removeChild(el); });