summaryrefslogtreecommitdiff
path: root/public/js/extra.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-06-17 16:27:37 +0800
committerCheng-Han, Wu2016-06-17 16:27:37 +0800
commit71f61b7f840b7e557d44b130e69fdb3c9e24d6d9 (patch)
treec1251feaebefaa2f8e663680bbd45e506c845675 /public/js/extra.js
parent5d031098274ddfd89d1d8476f896b881845f059a (diff)
Update all client dependencies and cdn versions, workaround sequence-diagram svg to be resizable
Diffstat (limited to 'public/js/extra.js')
-rw-r--r--public/js/extra.js3
1 files changed, 3 insertions, 0 deletions
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);
}