Selaa lähdekoodia

fix(graph): fixed for color picker layout issue when right side legend was used, fixes #3093

Torkel Ödegaard 10 vuotta sitten
vanhempi
commit
4dcd2ceb01
2 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 1 0
      CHANGELOG.md
  2. 6 1
      public/app/panels/graph/legend.js

+ 1 - 0
CHANGELOG.md

@@ -8,6 +8,7 @@
 * **cloudwatch**: fix for handling of period for long time ranges, fixes [#3086](https://github.com/grafana/grafana/issues/3086)
 * **dashboard**: fix for collapse row by clicking on row title, fixes [#3065](https://github.com/grafana/grafana/issues/3065)
 * **influxdb**: fix for relative time ranges `last x months` and `last x years`, fixes [#3067](https://github.com/grafana/grafana/issues/3067)
+* **graph**: layout fix for color picker when right side legend was enabled, fixes [#3093](https://github.com/grafana/grafana/issues/3093)
 
 # 2.5 (2015-10-28)
 

+ 6 - 1
public/app/panels/graph/legend.js

@@ -34,7 +34,12 @@ function (angular, _, kbn, $) {
         }
 
         function openColorSelector(e) {
-          var el = $(e.currentTarget);
+          // if we clicked inside poup container ignore click
+          if ($(e.target).parents('.popover').length) {
+            return;
+          }
+
+          var el = $(e.currentTarget).find('.fa-minus');
           var index = getSeriesIndexForElement(el);
           var seriesInfo = seriesList[index];
           var popoverScope = scope.$new();