Commit 88877cb0f52fec160fef01f4aef811f672891510

Authored by Igor Kulikov
1 parent cc05d610

UI: Maps show tooltip option.

@@ -130,7 +130,7 @@ export default class TbMapWidgetV2 { @@ -130,7 +130,7 @@ export default class TbMapWidgetV2 {
130 this.locationSettings.tooltipPattern = this.ctx.settings.tooltipPattern || "<b>${entityName}</b><br/><br/><b>Latitude:</b> ${"+this.locationSettings.latKeyName+":7}<br/><b>Longitude:</b> ${"+this.locationSettings.lngKeyName+":7}"; 130 this.locationSettings.tooltipPattern = this.ctx.settings.tooltipPattern || "<b>${entityName}</b><br/><br/><b>Latitude:</b> ${"+this.locationSettings.latKeyName+":7}<br/><b>Longitude:</b> ${"+this.locationSettings.lngKeyName+":7}";
131 131
132 this.locationSettings.showLabel = this.ctx.settings.showLabel !== false; 132 this.locationSettings.showLabel = this.ctx.settings.showLabel !== false;
133 - this.locationSettings.displayTooltip = true; 133 + this.locationSettings.displayTooltip = this.ctx.settings.showTooltip !== false;
134 this.locationSettings.labelColor = this.ctx.widgetConfig.color || '#000000', 134 this.locationSettings.labelColor = this.ctx.widgetConfig.color || '#000000',
135 this.locationSettings.label = this.ctx.settings.label || "${entityName}"; 135 this.locationSettings.label = this.ctx.settings.label || "${entityName}";
136 this.locationSettings.color = this.ctx.settings.color ? tinycolor(this.ctx.settings.color).toHexString() : "#FE7569"; 136 this.locationSettings.color = this.ctx.settings.color ? tinycolor(this.ctx.settings.color).toHexString() : "#FE7569";
@@ -581,6 +581,11 @@ const commonMapSettingsSchema = @@ -581,6 +581,11 @@ const commonMapSettingsSchema =
581 "type":"string", 581 "type":"string",
582 "default":"${entityName}" 582 "default":"${entityName}"
583 }, 583 },
  584 + "showTooltip": {
  585 + "title": "Show tooltip",
  586 + "type":"boolean",
  587 + "default":true
  588 + },
584 "tooltipPattern":{ 589 "tooltipPattern":{
585 "title":"Tooltip (for ex. 'Text ${keyName} units.' or <link-act name='my-action'>Link text</link-act>')", 590 "title":"Tooltip (for ex. 'Text ${keyName} units.' or <link-act name='my-action'>Link text</link-act>')",
586 "type":"string", 591 "type":"string",
@@ -635,6 +640,7 @@ const commonMapSettingsSchema = @@ -635,6 +640,7 @@ const commonMapSettingsSchema =
635 "lngKeyName", 640 "lngKeyName",
636 "showLabel", 641 "showLabel",
637 "label", 642 "label",
  643 + "showTooltip",
638 { 644 {
639 "key": "tooltipPattern", 645 "key": "tooltipPattern",
640 "type": "textarea" 646 "type": "textarea"
@@ -737,6 +743,11 @@ const imageMapSettingsSchema = @@ -737,6 +743,11 @@ const imageMapSettingsSchema =
737 "type":"string", 743 "type":"string",
738 "default":"${entityName}" 744 "default":"${entityName}"
739 }, 745 },
  746 + "showTooltip": {
  747 + "title": "Show tooltip",
  748 + "type":"boolean",
  749 + "default":true
  750 + },
740 "tooltipPattern":{ 751 "tooltipPattern":{
741 "title":"Tooltip (for ex. 'Text ${keyName} units.' or <link-act name='my-action'>Link text</link-act>')", 752 "title":"Tooltip (for ex. 'Text ${keyName} units.' or <link-act name='my-action'>Link text</link-act>')",
742 "type":"string", 753 "type":"string",
@@ -810,6 +821,7 @@ const imageMapSettingsSchema = @@ -810,6 +821,7 @@ const imageMapSettingsSchema =
810 "yPosKeyName", 821 "yPosKeyName",
811 "showLabel", 822 "showLabel",
812 "label", 823 "label",
  824 + "showTooltip",
813 { 825 {
814 "key": "tooltipPattern", 826 "key": "tooltipPattern",
815 "type": "textarea" 827 "type": "textarea"