MCPcopy
hub / github.com/markmap/markmap / create

Method create

packages/markmap-view/src/view.ts:766–778  ·  view source on GitHub ↗
(
    svg: string | SVGElement | ID3SVGElement,
    opts?: Partial<IMarkmapOptions>,
    data: IPureNode | null = null,
  )

Source from the content-addressed store, hash-verified

764 }
765
766 static create(
767 svg: string | SVGElement | ID3SVGElement,
768 opts?: Partial<IMarkmapOptions>,
769 data: IPureNode | null = null,
770 ): Markmap {
771 const mm = new Markmap(svg, opts);
772 if (data) {
773 mm.setData(data).then(() => {
774 mm.fit(); // always fit for the first render
775 });
776 }
777 return mm;
778 }
779}

Callers 2

fillTemplateFunction · 0.45
renderFunction · 0.45

Calls 2

setDataMethod · 0.95
fitMethod · 0.95

Tested by

no test coverage detected