Skip to content

Commit 21d5bbf

Browse files
committed
fix: adjust readme
1 parent ec92eaa commit 21d5bbf

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ feat: `ctrl+m ctrl+m`, Trigger Markmap for editing mode.
77
feat: `Markmap` slash command.
88
feat: `Markmap` contextual menu.
99
feat: Editing block or highlighting block will be the central node of the Markmap, otherwise it will use the whole page blocks.
10+
fix: Local images can not popup after changing graph.
1011

1112
## 0.1.2
1213

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,11 @@ Most of features come from `Markmap` project.
9292

9393
## Markmap trigger
9494

95-
* `m m`: trigger Markmap for non-editing mode.
96-
* `ctrl+m ctrl+m`: trigger Markmap for editing mode.
95+
* `m m`: trigger Markmap for non-editing mode, show currennt block and children when editing or highlighting, otherwise show all page blocks.
96+
* `ctrl+m ctrl+m`: trigger Markmap for editing mode, show current block and children.
9797
* `/Markmap` slash command: to trigger markmap for current block and children.
9898
* `Markmap` contextual menu item: to trigger markmap for current block and children.
99+
* Icon Button: to trigger markmap for current page.
99100

100101
## Markmap properties
101102

src/main.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,19 @@ async function main() {
156156
let originalRoot: INode;
157157
let originalTotalLevel: number;
158158

159+
let config = await logseq.App.getUserConfigs();
160+
161+
// reload config if graph change
162+
logseq.App.onCurrentGraphChanged(async () => {
163+
config = await logseq.App.getUserConfigs();
164+
});
165+
159166
logseq.on('ui:visible:changed', async ({ visible }) => {
160167
if (!visible) {
161168
return;
162169
}
163170

164-
const config = await logseq.App.getUserConfigs();
171+
165172
let blocks = await logseq.Editor.getCurrentPageBlocksTree();
166173
let page = await logseq.Editor.getCurrentPage() as any;
167174

0 commit comments

Comments
 (0)