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

Method selectCard

src/views/selection/SelectionManager.ts:109–118  ·  view source on GitHub ↗

* 选中单个卡片 * @param element 卡片元素 * @param highlight 高亮数据

(element: HTMLElement, highlight: HighlightInfo)

Source from the content-addressed store, hash-verified

107 * @param highlight 高亮数据
108 */
109 selectCard(element: HTMLElement, highlight: HighlightInfo) {
110 // 添加到选中集合
111 this.selectedCards.set(element, highlight);
112
113 // 更新 DOM 状态
114 element.addClass('selected');
115
116 // 通知选择变化
117 this.notifySelectionChange();
118 }
119
120 /**
121 * 取消选中单个卡片

Callers

nothing calls this directly

Calls 2

notifySelectionChangeMethod · 0.95
setMethod · 0.80

Tested by

no test coverage detected