style: fix markmap height to 300px

Signed-off-by: Raccoon <raccoon@hackmd.io>
This commit is contained in:
Raccoon 2020-04-12 00:59:12 +08:00
parent fb02ee3922
commit 65b040545c
No known key found for this signature in database
GPG Key ID: 06770355DC9ECD38
2 changed files with 12 additions and 2 deletions

View File

@ -84,6 +84,16 @@
height: 250px;
}
/* markmap */
.markmap-container {
height: 300px;
}
.markmap-container > svg {
width: 100%;
height: 100%;
}
.MJX_Assistive_MathML {
display: none;
}

View File

@ -494,8 +494,8 @@ export function finishView (view) {
$value.unwrap()
try {
const data = transform(content)
$elem.html(`<div class="markmap"><svg style="width: 100%;" class="markmap rendered"></svg></div>`)
markmap($elem.find('svg.markmap.rendered')[0], data, {
$elem.html(`<div class="markmap-container"><svg></svg></div>`)
markmap($elem.find('svg')[0], data, {
duration: 0
})
} catch (err) {