Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
Popup open with ctrl+left click
  • Loading branch information
gitcpy authored Sep 12, 2024
1 parent 14267e3 commit 8fed0d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export default class MermaidPopupPlugin extends Plugin {

// 绑定新的事件处理
handleMermaidClick = (evt: MouseEvent) => {
if (!evt.ctrlKey) return;

const target = evt.target as HTMLElement;
const mermaidDiv = target.closest('.mermaid') as HTMLElement;
if (mermaidDiv) {
Expand Down

0 comments on commit 8fed0d7

Please sign in to comment.