ensure we don't break for artifacts without jarvis data (e.g. a future artifact type)
make shard marker semi-transparent - avoids the harsh white outline and makes the underlying portal and it's colour partly visible
This commit is contained in:
parent
2e16a001b9
commit
08b7a5ec6f
@ -176,11 +176,9 @@ window.artifact.updateLayer = function() {
|
|||||||
// jarvis shard icon
|
// jarvis shard icon
|
||||||
var iconUrl = undefined;
|
var iconUrl = undefined;
|
||||||
var iconSize = 0;
|
var iconSize = 0;
|
||||||
|
var opacity = 1.0;
|
||||||
|
|
||||||
if (data.jarvis.fragments) {
|
if (data.jarvis) {
|
||||||
iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/jarvis_shard.png';
|
|
||||||
iconSize = 60/2; // 60 pixels - half that size works better
|
|
||||||
}
|
|
||||||
if (data.jarvis.target) {
|
if (data.jarvis.target) {
|
||||||
// target portal - show the target marker. use the count of fragments at the target to pick the right icon - it has segments that fill up
|
// target portal - show the target marker. use the count of fragments at the target to pick the right icon - it has segments that fill up
|
||||||
|
|
||||||
@ -188,6 +186,12 @@ window.artifact.updateLayer = function() {
|
|||||||
|
|
||||||
iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/jarvis_shard_target_'+count+'.png';
|
iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/jarvis_shard_target_'+count+'.png';
|
||||||
iconSize = 100/2; // 100 pixels - half that size works better
|
iconSize = 100/2; // 100 pixels - half that size works better
|
||||||
|
} else if (data.jarvis.fragments) {
|
||||||
|
iconUrl = '//commondatastorage.googleapis.com/ingress.com/img/map_icons/marker_images/jarvis_shard.png';
|
||||||
|
iconSize = 60/2; // 60 pixels - half that size works better
|
||||||
|
opacity = 0.6; // these often hide portals - let's make them semi transparent
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iconUrl) {
|
if (iconUrl) {
|
||||||
@ -198,7 +202,7 @@ window.artifact.updateLayer = function() {
|
|||||||
className: 'no-pointer-events' // the clickable: false below still blocks events going through to the svg underneath
|
className: 'no-pointer-events' // the clickable: false below still blocks events going through to the svg underneath
|
||||||
});
|
});
|
||||||
|
|
||||||
var marker = L.marker (latlng, {icon: icon, clickable: false, keyboard: false});
|
var marker = L.marker (latlng, {icon: icon, clickable: false, keyboard: false, opacity: opacity });
|
||||||
|
|
||||||
artifact._layer.addLayer(marker);
|
artifact._layer.addLayer(marker);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user