MCPcopy
hub / github.com/markmap/markmap / render

Method render

packages/markmap-toolbar/src/toolbar.tsx:161–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 }
160
161 render() {
162 const items = this.items
163 .map((item: string | IToolbarItem): IToolbarItem => {
164 if (typeof item === 'string') {
165 const data = this.registry[item];
166 if (!data) console.warn(`[markmap-toolbar] ${item} not found`);
167 return data;
168 }
169 return item;
170 })
171 .filter(Boolean);
172 while (this.el.firstChild) {
173 this.el.firstChild.remove();
174 }
175 this.el.append(
176 mountDom(
177 <>
178 {this.showBrand && renderBrand()}
179 {items.map(renderItem)}
180 </>,
181 ),
182 );
183 return this.el;
184 }
185}

Callers 5

constructorMethod · 0.95
setBrandMethod · 0.95
setItemsMethod · 0.95
renderToolbarFunction · 0.95
transformMethod · 0.80

Calls 1

renderBrandFunction · 0.85

Tested by

no test coverage detected