♻️ Updated markdown preview extension
This commit is contained in:
@@ -144,7 +144,7 @@ const onMouseMove = (e: MouseEvent) => {
|
||||
? (editorView.dom.parentElement?.clientHeight || editorView.dom.clientHeight)
|
||||
: 9999;
|
||||
|
||||
const newHeight = Math.max(100, Math.min(maxHeight, startHeight + delta));
|
||||
const newHeight = Math.max(10, Math.min(maxHeight, startHeight + delta));
|
||||
markdownPreviewManager.updateHeight(newHeight);
|
||||
};
|
||||
|
||||
@@ -337,7 +337,7 @@ onUnmounted(() => {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
min-height: 10px;
|
||||
background: var(--bg-primary);
|
||||
border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
|
||||
display: flex;
|
||||
|
||||
@@ -54,7 +54,7 @@ class MarkdownPreviewManager {
|
||||
|
||||
this.state.value = {
|
||||
visible: true,
|
||||
position: { height: Math.max(100, defaultHeight) },
|
||||
position: { height: Math.max(10, defaultHeight) },
|
||||
content,
|
||||
blockFrom,
|
||||
blockTo,
|
||||
@@ -85,7 +85,7 @@ class MarkdownPreviewManager {
|
||||
|
||||
this.state.value = {
|
||||
...this.state.value,
|
||||
position: { height: Math.max(100, height) }
|
||||
position: { height: Math.max(10, height) }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user