Преглед изворни кода

fix for issue #18,disable click on map regions with 0 hits

Rashid Khan пре 12 година
родитељ
комит
79dbffc875
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      panels/map/module.js

+ 3 - 1
panels/map/module.js

@@ -140,7 +140,9 @@ angular.module('kibana.map', [])
             onRegionOut: function(event, code) {
             },
             onRegionClick: function(event, code) {
-              scope.build_search(scope.panel.field,code)
+              var count = _.isUndefined(scope.data[code]) ? 0 : scope.data[code];
+              if (count != 0) 
+                scope.build_search(scope.panel.field,code)
             }
           });
         })