Resize axis on window resize

This commit is contained in:
Phyks 2014-03-28 01:13:17 +01:00
parent 401c7a46e3
commit bc3910c612

View File

@ -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);
});