MCPcopy Create free account
hub / github.com/CatMuse/HiNote / createCommentWidget

Function createCommentWidget

src/editor/EditorHighlightDecorations.ts:69–81  ·  view source on GitHub ↗
(plugin: HiNotePluginContext, highlight: HiNote)

Source from the content-addressed store, hash-verified

67}
68
69function createCommentWidget(plugin: HiNotePluginContext, highlight: HiNote): Decoration {
70 return Decoration.widget({
71 widget: new CommentWidget(
72 plugin,
73 highlight,
74 () => {
75 void CommentWidgetHelper.openCommentPanel(plugin.app, highlight, plugin.eventManager);
76 }
77 ),
78 side: 2,
79 stopEvent: (event: Event) => event.type === 'mousedown' || event.type === 'mouseup'
80 });
81}
82
83function shouldShowCommentWidget(plugin: HiNotePluginContext): boolean {
84 return plugin.settings.showCommentWidget !== false;

Callers 1

buildDecorationsMethod · 0.85

Calls 1

openCommentPanelMethod · 0.80

Tested by

no test coverage detected