Procházet zdrojové kódy

Merge pull request #3779 from bergquist/playlist_stop_playing

feat(playlist): clicks outside control stops playlist
Carl Bergquist před 10 roky
rodič
revize
389dd12ab4
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      public/app/core/components/grafana_app.ts

+ 5 - 1
public/app/core/components/grafana_app.ts

@@ -139,7 +139,7 @@ export class GrafanaCtrl {
   }
 }
 
-export function grafanaAppDirective() {
+export function grafanaAppDirective(playlistSrv) {
   return {
     restrict: 'E',
     controller: GrafanaCtrl,
@@ -170,6 +170,10 @@ export function grafanaAppDirective() {
           return;
         }
 
+        if (target.parents('.dash-playlist-actions').length === 0) {
+            playlistSrv.stop();
+        }
+
         // hide search
         if (elem.find('.search-container').length > 0) {
           if (target.parents('.search-container').length === 0) {