More robust Squaremap fill/stroke checks. Fixes #359
This commit is contained in:
parent
c6948a7d50
commit
af8f197a3e
@ -351,11 +351,11 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
|||||||
id,
|
id,
|
||||||
type: LiveAtlasMarkerType.AREA,
|
type: LiveAtlasMarkerType.AREA,
|
||||||
style: {
|
style: {
|
||||||
stroke: typeof area.stroke !== 'undefined' ? !!area.stroke : true,
|
stroke: (typeof area.stroke === 'undefined' || !!area.stroke) && !!area.color,
|
||||||
color: area.color || '#3388ff',
|
color: area.color || '#3388ff',
|
||||||
weight: area.weight || 3,
|
weight: area.weight || 3,
|
||||||
opacity: typeof area.opacity !== 'undefined' ? area.opacity : 1,
|
opacity: typeof area.opacity !== 'undefined' ? area.opacity : 1,
|
||||||
fill: typeof area.fill !== 'undefined' ? !!area.fill : true,
|
fill: (typeof area.fill === 'undefined' || !!area.fill) && !!area.fillColor,
|
||||||
fillColor: area.fillColor || area.color || '#3388ff',
|
fillColor: area.fillColor || area.color || '#3388ff',
|
||||||
fillOpacity: area.fillOpacity || 0.2,
|
fillOpacity: area.fillOpacity || 0.2,
|
||||||
fillRule: area.fillRule,
|
fillRule: area.fillRule,
|
||||||
@ -380,7 +380,7 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
|||||||
id,
|
id,
|
||||||
type: LiveAtlasMarkerType.LINE,
|
type: LiveAtlasMarkerType.LINE,
|
||||||
style: {
|
style: {
|
||||||
stroke: typeof line.stroke !== 'undefined' ? !!line.stroke : true,
|
stroke: (typeof line.stroke === 'undefined' || !!line.stroke) && !!line.color,
|
||||||
color: line.color || '#3388ff',
|
color: line.color || '#3388ff',
|
||||||
weight: line.weight || 3,
|
weight: line.weight || 3,
|
||||||
opacity: typeof line.opacity !== 'undefined' ? line.opacity : 1,
|
opacity: typeof line.opacity !== 'undefined' ? line.opacity : 1,
|
||||||
@ -413,11 +413,11 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
|||||||
min: {x: location.x - radius[0], y: 0, z: location.z - radius[1] },
|
min: {x: location.x - radius[0], y: 0, z: location.z - radius[1] },
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
stroke: typeof circle.stroke !== 'undefined' ? !!circle.stroke : true,
|
stroke: (typeof circle.stroke === 'undefined' || !!circle.stroke) && !!circle.color,
|
||||||
color: circle.color || '#3388ff',
|
color: circle.color || '#3388ff',
|
||||||
weight: circle.weight || 3,
|
weight: circle.weight || 3,
|
||||||
opacity: typeof circle.opacity !== 'undefined' ? circle.opacity : 1,
|
opacity: typeof circle.opacity !== 'undefined' ? circle.opacity : 1,
|
||||||
fill: typeof circle.stroke !== 'undefined' ? !!circle.stroke : true,
|
fill: (typeof circle.fill === 'undefined' || !!circle.fill) && !!circle.fillColor,
|
||||||
fillColor: circle.fillColor || circle.color || '#3388ff',
|
fillColor: circle.fillColor || circle.color || '#3388ff',
|
||||||
fillOpacity: circle.fillOpacity || 0.2,
|
fillOpacity: circle.fillOpacity || 0.2,
|
||||||
fillRule: circle.fillRule,
|
fillRule: circle.fillRule,
|
||||||
|
Loading…
Reference in New Issue
Block a user