Explorar el Código

fix injecting dependencies to graph legend directive

Marcus Efraimsson hace 7 años
padre
commit
e6abc0691e
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      public/app/plugins/panel/graph/legend.ts

+ 5 - 2
public/app/plugins/panel/graph/legend.ts

@@ -3,7 +3,8 @@ import $ from 'jquery';
 import baron from 'baron';
 import coreModule from 'app/core/core_module';
 
-coreModule.directive('graphLegend', (popoverSrv, $timeout) => {
+/** @ngInject */
+function graphLegendDirective(popoverSrv, $timeout) {
   return {
     link: (scope, elem) => {
       let firstRender = true;
@@ -300,4 +301,6 @@ coreModule.directive('graphLegend', (popoverSrv, $timeout) => {
       }
     },
   };
-});
+}
+
+coreModule.directive('graphLegend', graphLegendDirective);