MCPcopy
hub / github.com/markmap/markmap / setData

Method setData

packages/markmap-view/src/view.ts:290–296  ·  view source on GitHub ↗
(data?: IPureNode | null, opts?: Partial<IMarkmapOptions>)

Source from the content-addressed store, hash-verified

288 }
289
290 async setData(data?: IPureNode | null, opts?: Partial<IMarkmapOptions>) {
291 if (opts) this.setOptions(opts);
292 if (data) this.state.data = this._initializeData(data);
293 if (!this.state.data) return;
294 this.updateStyle();
295 await this.renderData();
296 }
297
298 async setHighlight(node?: INode | null) {
299 this.state.highlight = node || undefined;

Callers 4

constructorMethod · 0.95
createMethod · 0.95
doRenderFunction · 0.80
checkDataFunction · 0.80

Calls 4

setOptionsMethod · 0.95
_initializeDataMethod · 0.95
updateStyleMethod · 0.95
renderDataMethod · 0.95

Tested by

no test coverage detected