mirror of
https://github.com/nymbo/Markdown-Minimap.git
synced 2026-07-22 17:42:05 +00:00
Render the note's Markdown source into a scaled div inside the pane for both edit and reading modes, removing the hidden helper leaves and the srcdoc iframe. Fixes the data-loss window in the helper force-render, workspace pollution from hidden sidebar tabs, the stale active-view read on leaf change, destroy/resize races, the leaked refresh button on unload, and wrong-file renders for background notes. Adds toggle and refresh commands, background-pane sync on vault modify, a trailing scroll re-sync for CodeMirror height settling, and scoped reading-view selectors so the minimap never binds itself as the scroll source. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
53 lines
1.2 KiB
CSS
53 lines
1.2 KiB
CSS
.minimap-container {
|
|
position: absolute;
|
|
height: 100%;
|
|
width: 100%;
|
|
pointer-events: none;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* The extra specificity intentionally overrides .markdown-preview-view's
|
|
height/overflow so the content keeps its natural rendered height. */
|
|
.minimap-container .minimap-content {
|
|
position: absolute;
|
|
top: 0;
|
|
right: var(--minimap-scrollbar-gutter, 14px);
|
|
width: 100%;
|
|
height: auto;
|
|
overflow: visible;
|
|
padding: var(--file-margins, 16px);
|
|
pointer-events: none;
|
|
user-select: none;
|
|
scale: var(--scale);
|
|
transform-origin: top right;
|
|
z-index: 1;
|
|
}
|
|
|
|
.minimap-slider {
|
|
right: var(--minimap-scrollbar-gutter, 14px);
|
|
position: absolute;
|
|
width: calc(100% * var(--scale));
|
|
background-color: var(--code-comment);
|
|
z-index: 2;
|
|
}
|
|
|
|
.minimap-slider.dragging {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.minimap-hitbox {
|
|
position: absolute;
|
|
top: var(--minimap-top-offset, 0px);
|
|
right: var(--minimap-scrollbar-gutter, 14px);
|
|
height: calc(
|
|
100% - var(--minimap-top-offset, 0px) - var(--minimap-bottom-offset, 0px)
|
|
);
|
|
width: calc(100% * var(--scale));
|
|
pointer-events: auto;
|
|
z-index: 3;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.minimap-disabled .minimap-container {
|
|
display: none;
|
|
}
|