浏览代码

[search] Improve clustering display

Enrico Berti 10 年之前
父节点
当前提交
507a495

+ 22 - 4
desktop/core/src/desktop/static/desktop/css/nv.d3.css

@@ -29,11 +29,29 @@ Overrides nvd3 classes
 }
 
 .nvd3 .selected {
-  stroke-width: 2!important;
+  stroke-width: 2 !important;
   stroke-dasharray: 5;
-  stroke-opacity: 1!important;
+  stroke-opacity: 1 !important;
 }
 
 .nvd3 .selected > rect {
-  stroke-opacity: 1!important;
-}
+  stroke-opacity: 1 !important;
+}
+
+svg {
+  display: block;
+  width: auto;
+  height: auto;
+}
+
+svg:not(.leaflet-zoom-animated) {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  display: block;
+  width: 100%;
+  height: 100%
+}

+ 6 - 1
desktop/core/src/desktop/static/desktop/js/ko.charts.js

@@ -370,7 +370,12 @@ ko.bindingHandlers.leafletMapChart = {
             }).addTo(_map);
           }
 
-          var _clusterGroup = L.markerClusterGroup();
+          var _clusterGroup = L.markerClusterGroup({
+            maxClusterRadius: 10,
+            polygonOptions: {
+              weight: 1.5
+            }
+          });
           _data.forEach(function (item) {
             if (item && item.lng != null && item.lat != null) {
               var _addMarker = false;