fix:修复地图无限滚动的问题 & legend option添加悬浮背景色

This commit is contained in:
wangwenrui
2020-11-02 10:32:23 +08:00
parent 4ee5f94cc0
commit b06b275adb
4 changed files with 10 additions and 4 deletions

View File

@@ -44,6 +44,10 @@
.legend-option-cell{
white-space: nowrap;padding: 0px 5px 0px 5px;
}
.legend-container table tr:hover{
background-color: #e6e6e6;
}
.nz-icon-warning{
color: #e6a23c;
}

View File

@@ -90,7 +90,7 @@
</template>
<template v-else>
<div class="legend-container legend-container-screen" ref="screenLegendArea" @mouseenter="mouseEnterFullChart" @mouseleave="mouseLeaveFullChart" v-show="showLegend" v-scrollBar:legend>
<table style="width: 100%">
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
<th style="width: 100%"></th>
<template v-for="legendOption in screenLegendOptions">
<th v-if="legendOption.value == 'on'" class="option-th legend-option-cell" >

View File

@@ -66,7 +66,7 @@
</template>
<template v-else>
<div class='legend-container' ref="legendArea" v-show="firstShow" v-scrollBar:legend>
<table style="width: 100%">
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
<th style="width: 100%"></th>
<template v-for="legendOption in legendOptions">
<th v-if="legendOption.value == 'on'" class="option-th legend-option-cell" >
@@ -146,7 +146,7 @@
</template>
<template v-else>
<div class="legend-container legend-container-screen" :id="'screenLegendArea'+chartIndex" @mouseenter="mouseEnterFullChart" @mouseleave="mouseLeaveFullChart" v-show="showLegend" v-scrollBar:legend>
<table style="width: 100%">
<table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
<th style="width: 100%"></th>
<template v-for="legendOption in screenLegendOptions">
<th v-if="legendOption.value == 'on'" class="option-th legend-option-cell" >

View File

@@ -793,6 +793,7 @@
maxZoom:mapConfig.maxZoom,
attributionControl:false,
zoomControl:false,
maxBounds:L.latLngBounds(L.latLng(-90,-180),L.latLng(90,180))
}).setView([mapConfig.latitude,mapConfig.longitude],mapConfig.zoom);
map.createPane("myPane", document.querySelector(".my-pane"));
map.on("tooltipopen", function(param) {
@@ -805,7 +806,8 @@
this.map = map;
L.tileLayer(
"/static/Tiles/{z}/{x}/{y}.png"
"/static/Tiles/{z}/{x}/{y}.png",
{noWrap:true}
).addTo(map);
let attribution=L.control.attribution({position:'bottomright',prefix:''})