From 65b040545cb62ff04ceea910968adf80fafd7a69 Mon Sep 17 00:00:00 2001 From: Raccoon Date: Sun, 12 Apr 2020 00:59:12 +0800 Subject: [PATCH] style: fix markmap height to 300px Signed-off-by: Raccoon --- public/css/extra.css | 10 ++++++++++ public/js/extra.js | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/public/css/extra.css b/public/css/extra.css index 2b23ad24..e795bc1b 100644 --- a/public/css/extra.css +++ b/public/css/extra.css @@ -84,6 +84,16 @@ height: 250px; } +/* markmap */ +.markmap-container { + height: 300px; +} + +.markmap-container > svg { + width: 100%; + height: 100%; +} + .MJX_Assistive_MathML { display: none; } diff --git a/public/js/extra.js b/public/js/extra.js index 8325b39a..50904c6e 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -494,8 +494,8 @@ export function finishView (view) { $value.unwrap() try { const data = transform(content) - $elem.html(`
`) - markmap($elem.find('svg.markmap.rendered')[0], data, { + $elem.html(`
`) + markmap($elem.find('svg')[0], data, { duration: 0 }) } catch (err) {