Skip to content

Commit 65b0405

Browse files
committed
style: fix markmap height to 300px
Signed-off-by: Raccoon <raccoon@hackmd.io>
1 parent fb02ee3 commit 65b0405

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

public/css/extra.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@
8484
height: 250px;
8585
}
8686

87+
/* markmap */
88+
.markmap-container {
89+
height: 300px;
90+
}
91+
92+
.markmap-container > svg {
93+
width: 100%;
94+
height: 100%;
95+
}
96+
8797
.MJX_Assistive_MathML {
8898
display: none;
8999
}

public/js/extra.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,8 @@ export function finishView (view) {
494494
$value.unwrap()
495495
try {
496496
const data = transform(content)
497-
$elem.html(`<div class="markmap"><svg style="width: 100%;" class="markmap rendered"></svg></div>`)
498-
markmap($elem.find('svg.markmap.rendered')[0], data, {
497+
$elem.html(`<div class="markmap-container"><svg></svg></div>`)
498+
markmap($elem.find('svg')[0], data, {
499499
duration: 0
500500
})
501501
} catch (err) {

0 commit comments

Comments
 (0)