From f84534adea596146afe30dd93aad8f1183a634f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 8 May 2018 09:45:08 +0200 Subject: [PATCH] Revert "Add baron scrollbar to a node managed by gafana (#11850)" This reverts commit 34133671b9bc33f4149ec1e309e28a80404e9ec8. --- docs/sources/plugins/developing/panels.md | 2 ++ public/app/features/panel/panel_directive.ts | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sources/plugins/developing/panels.md b/docs/sources/plugins/developing/panels.md index 7212e7b4bdf..d679288e2d2 100644 --- a/docs/sources/plugins/developing/panels.md +++ b/docs/sources/plugins/developing/panels.md @@ -25,6 +25,8 @@ export class MyPanelCtrl extends PanelCtrl { ... ``` +In this case, make sure the template has a single `
...
` root. The plugin loader will modifiy that element adding a scrollbar. + ### Examples diff --git a/public/app/features/panel/panel_directive.ts b/public/app/features/panel/panel_directive.ts index 3f8c747f28c..e549ca262d3 100644 --- a/public/app/features/panel/panel_directive.ts +++ b/public/app/features/panel/panel_directive.ts @@ -21,9 +21,7 @@ var panelTemplate = `
-
-
-
+
@@ -115,7 +113,7 @@ module.directive('grafanaPanel', function($rootScope, $document, $timeout) { `; let scrollRoot = panelContent; - let scroller = panelContent.find(':first'); + let scroller = panelContent.find(':first').find(':first'); scrollRoot.addClass(scrollRootClass); $(scrollBarHTML).appendTo(scrollRoot);