Fix to use identity operators
This commit is contained in:
parent
7c019e1eb8
commit
9889e0988f
@ -555,13 +555,13 @@ window.renderField = function(ent) {
|
|||||||
// now be appropriate or not to show an MU count
|
// now be appropriate or not to show an MU count
|
||||||
var old = findEntityInLeaflet(fieldsLayer, window.fields, ent[0]);
|
var old = findEntityInLeaflet(fieldsLayer, window.fields, ent[0]);
|
||||||
if(old) {
|
if(old) {
|
||||||
if(map.getZoom() == old.options.creationZoom) return;
|
if(map.getZoom() === old.options.creationZoom) return;
|
||||||
var layerCount = 0;
|
var layerCount = 0;
|
||||||
old.eachLayer(function(item) {
|
old.eachLayer(function(item) {
|
||||||
layerCount++;
|
layerCount++;
|
||||||
});
|
});
|
||||||
if(areaZoomRatio > FIELD_MU_DISPLAY_AREA_ZOOM_RATIO && layerCount == 2) return;
|
if(areaZoomRatio > FIELD_MU_DISPLAY_AREA_ZOOM_RATIO && layerCount === 2) return;
|
||||||
if(areaZoomRatio <= FIELD_MU_DISPLAY_AREA_ZOOM_RATIO && layerCount == 1) return;
|
if(areaZoomRatio <= FIELD_MU_DISPLAY_AREA_ZOOM_RATIO && layerCount === 1) return;
|
||||||
removeByGuid(ent[0]);
|
removeByGuid(ent[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user