Browse Source

UI: Fixed label polyline/circle follow the mouse

pull/7174/head
Vladyslav_Prykhodko 4 years ago
parent
commit
78dfe7ca19
  1. 2
      ui-ngx/src/app/modules/home/components/widget/lib/maps/circle.ts
  2. 2
      ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts

2
ui-ngx/src/app/modules/home/components/widget/lib/maps/circle.ts

@ -102,7 +102,7 @@ export class Circle {
const circleLabelText = fillDataPattern(this.map.circleLabelText, this.map.replaceInfoTooltipCircle, this.data);
const labelColor = this.map.ctx.widgetConfig.color;
this.leafletCircle.bindTooltip(`<div style="color: ${labelColor};"><b>${circleLabelText}</b></div>`,
{ className: 'tb-polygon-label', permanent: true, sticky: true, direction: 'center'})
{ className: 'tb-polygon-label', permanent: true, direction: 'center'})
.openTooltip(this.leafletCircle.getLatLng());
}
}

2
ui-ngx/src/app/modules/home/components/widget/lib/maps/polygon.ts

@ -110,7 +110,7 @@ export class Polygon {
const polygonLabelText = fillDataPattern(this.map.polygonLabelText, this.map.replaceInfoLabelPolygon, this.data);
const labelColor = this.map.ctx.widgetConfig.color;
this.leafletPoly.bindTooltip(`<div style="color: ${labelColor};"><b>${polygonLabelText}</b></div>`,
{ className: 'tb-polygon-label', permanent: true, sticky: true, direction: 'center' })
{ className: 'tb-polygon-label', permanent: true, direction: 'center' })
.openTooltip(this.leafletPoly.getBounds().getCenter());
}
}

Loading…
Cancel
Save