mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Maps] do not show circle border when symbol size is zero (#62644)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
7882e0c3a8
commit
3f11d9c84b
3 changed files with 18 additions and 7 deletions
|
@ -99,9 +99,13 @@ export class DynamicSizeProperty extends DynamicStyleProperty {
|
|||
}
|
||||
}
|
||||
|
||||
syncCircleStrokeWidthWithMb(mbLayerId, mbMap) {
|
||||
const lineWidth = this.getMbSizeExpression();
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', lineWidth);
|
||||
syncCircleStrokeWidthWithMb(mbLayerId, mbMap, hasNoRadius) {
|
||||
if (hasNoRadius) {
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', 0);
|
||||
} else {
|
||||
const lineWidth = this.getMbSizeExpression();
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', lineWidth);
|
||||
}
|
||||
}
|
||||
|
||||
syncCircleRadiusWithMb(mbLayerId, mbMap) {
|
||||
|
|
|
@ -35,8 +35,12 @@ export class StaticSizeProperty extends StaticStyleProperty {
|
|||
mbMap.setLayoutProperty(symbolLayerId, 'icon-size', this._options.size / halfIconPixels);
|
||||
}
|
||||
|
||||
syncCircleStrokeWidthWithMb(mbLayerId, mbMap) {
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', this._options.size);
|
||||
syncCircleStrokeWidthWithMb(mbLayerId, mbMap, hasNoRadius) {
|
||||
if (hasNoRadius) {
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', 0);
|
||||
} else {
|
||||
mbMap.setPaintProperty(mbLayerId, 'circle-stroke-width', this._options.size);
|
||||
}
|
||||
}
|
||||
|
||||
syncCircleRadiusWithMb(mbLayerId, mbMap) {
|
||||
|
|
|
@ -543,8 +543,11 @@ export class VectorStyle extends AbstractStyle {
|
|||
setMBPaintPropertiesForPoints({ alpha, mbMap, pointLayerId }) {
|
||||
this._fillColorStyleProperty.syncCircleColorWithMb(pointLayerId, mbMap, alpha);
|
||||
this._lineColorStyleProperty.syncCircleStrokeWithMb(pointLayerId, mbMap, alpha);
|
||||
this._lineWidthStyleProperty.syncCircleStrokeWidthWithMb(pointLayerId, mbMap);
|
||||
this._iconSizeStyleProperty.syncCircleRadiusWithMb(pointLayerId, mbMap);
|
||||
const hasNoRadius =
|
||||
!this._iconSizeStyleProperty.isDynamic() &&
|
||||
this._iconSizeStyleProperty.getOptions().size === 0;
|
||||
this._lineWidthStyleProperty.syncCircleStrokeWidthWithMb(pointLayerId, mbMap, hasNoRadius);
|
||||
this._iconSizeStyleProperty.syncCircleRadiusWithMb(pointLayerId, mbMap, hasNoRadius);
|
||||
}
|
||||
|
||||
setMBPropertiesForLabelText({ alpha, mbMap, textLayerId }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue