diff --git a/src/extensions/core/documentationSidebar.ts b/src/extensions/core/documentationSidebar.ts index 2fb13aa59..81ebb0c1e 100644 --- a/src/extensions/core/documentationSidebar.ts +++ b/src/extensions/core/documentationSidebar.ts @@ -42,9 +42,6 @@ function collapseOnClick() { let doCollapse = this.children[0].innerHTML == '-' setCollapse(this.parentElement, doCollapse) } -//TODO: connect with doc tooltips -//If doc sidebar is opened, the current node should not display tooltips, -//but navigate the sidebar pane as appropriate. function selectHelp(name: string, value?: string) { if (cdef[2]?.select) { return cdef[2].select(this, name, value) @@ -156,6 +153,9 @@ function updateNode(node?) { } content = '
' + def.display_name + '
' + content helpDOM.innerHTML = content + if (cdef.description[2]?.render) { + cdef.description[2].render(helpDOM) + } } } let docStyleElement = document.createElement('style') @@ -201,9 +201,6 @@ class DocumentationSidebar implements CustomSidebarTabExtension { if (!e?.children?.length) { e.appendChild(helpDOM) } - if (cdef.description[2]?.render) { - cdef.description[2].render(e) - } } } app.extensionManager.registerSidebarTab(new DocumentationSidebar())