Skip to content

Commit dbac793

Browse files
committed
fix(mdviewer): remove medium-zoom image feature and zoom-in cursor
1 parent 72a5443 commit dbac793

2 files changed

Lines changed: 0 additions & 16 deletions

File tree

src-mdviewer/src/components/viewer.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ Prism.manual = true;
44
import "../core/prism-languages.js";
55
import "../styles/syntax/prism-light.css";
66
import "../styles/syntax/prism-dark.css";
7-
import mediumZoom from "medium-zoom";
87
import { on } from "../core/events.js";
98
import { getState } from "../core/state.js";
109
import { t } from "../core/i18n.js";
1110

12-
let zoom = null;
13-
1411
const devLog = import.meta.env.DEV ? console.log.bind(console, "[viewer]") : () => {};
1512

1613
function getContentEl() {
@@ -68,7 +65,6 @@ export function initViewer() {
6865
});
6966
} else {
7067
addCopyButtons();
71-
initImageZoom();
7268
}
7369
});
7470

@@ -79,7 +75,6 @@ export function initViewer() {
7975

8076
if (!getState().editMode) {
8177
addCopyButtons();
82-
initImageZoom();
8378
}
8479
});
8580

@@ -187,13 +182,3 @@ function addCopyButtons() {
187182
});
188183
}
189184

190-
function initImageZoom() {
191-
if (zoom) {
192-
zoom.detach();
193-
}
194-
195-
zoom = mediumZoom("#viewer-content .markdown-body img", {
196-
margin: 24,
197-
background: "var(--color-bg)"
198-
});
199-
}

src-mdviewer/src/styles/markdown.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
height: auto;
7777
border-radius: var(--radius-md);
7878
border: 1px solid var(--color-border-subtle);
79-
cursor: zoom-in;
8079
}
8180

8281
/* Inline code */

0 commit comments

Comments
 (0)