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,
|
||||
type: LiveAtlasMarkerType.AREA,
|
||||
style: {
|
||||
stroke: typeof area.stroke !== 'undefined' ? !!area.stroke : true,
|
||||
stroke: (typeof area.stroke === 'undefined' || !!area.stroke) && !!area.color,
|
||||
color: area.color || '#3388ff',
|
||||
weight: area.weight || 3,
|
||||
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',
|
||||
fillOpacity: area.fillOpacity || 0.2,
|
||||
fillRule: area.fillRule,
|
||||
@ -380,7 +380,7 @@ export default class Pl3xmapMapProvider extends MapProvider {
|
||||
id,
|
||||
type: LiveAtlasMarkerType.LINE,
|
||||
style: {
|
||||
stroke: typeof line.stroke !== 'undefined' ? !!line.stroke : true,
|
||||
stroke: (typeof line.stroke === 'undefined' || !!line.stroke) && !!line.color,
|
||||
color: line.color || '#3388ff',
|
||||
weight: line.weight || 3,
|
||||
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] },
|
||||
},
|
||||
style: {
|
||||
stroke: typeof circle.stroke !== 'undefined' ? !!circle.stroke : true,
|
||||
stroke: (typeof circle.stroke === 'undefined' || !!circle.stroke) && !!circle.color,
|
||||
color: circle.color || '#3388ff',
|
||||
weight: circle.weight || 3,
|
||||
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',
|
||||
fillOpacity: circle.fillOpacity || 0.2,
|
||||
fillRule: circle.fillRule,
|
||||
|
Loading…
Reference in New Issue
Block a user