diff options
Diffstat (limited to 'plugins/base/src/main/resources/dokka/scripts')
-rw-r--r-- | plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js b/plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js index 1f99ba1f..88d4d71a 100644 --- a/plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js +++ b/plugins/base/src/main/resources/dokka/scripts/platform-content-handler.js @@ -82,7 +82,7 @@ const samplesAreEnabled = () => { const initHidingLeftNavigation = () => { - document.getElementById("leftToggler").onclick = function (event) { + document.getElementById("menu-toggle").onclick = function (event) { //Events need to be prevented from bubbling since they will trigger next handler event.preventDefault(); event.stopPropagation(); @@ -329,6 +329,16 @@ function refreshFiltering() { refreshFilterButtons() refreshPlatformTabs() refreshNoContentNotification() + refreshPlaygroundSamples() +} + +function refreshPlaygroundSamples() { + document.querySelectorAll('code.runnablesample').forEach(node => { + const playground = node.KotlinPlayground; + /* Some samples may be hidden by filter, they have 0px height for visible code area + * after rendering. Call this method for re-calculate code area height */ + playground && playground.view.codemirror.refresh(); + }); } function refreshNoContentNotification() { |