From 71f61b7f840b7e557d44b130e69fdb3c9e24d6d9 Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Fri, 17 Jun 2016 16:27:37 +0800 Subject: Update all client dependencies and cdn versions, workaround sequence-diagram svg to be resizable --- public/js/extra.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'public/js/extra.js') diff --git a/public/js/extra.js b/public/js/extra.js index b731770f..48e474a7 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -258,6 +258,9 @@ function finishView(view) { $ele.addClass('sequence-diagram'); $value.children().unwrap().unwrap(); + var svg = $ele.find('> svg'); + svg[0].setAttribute('viewBox', '0 0 ' + svg.attr('width') + ' ' + svg.attr('height')); + svg[0].setAttribute('preserveAspectRatio', 'xMidYMid meet'); } catch (err) { console.warn(err); } -- cgit v1.2.3