From ab69863f715baa1e1b233a6d4d5941f4f6ff736a Mon Sep 17 00:00:00 2001 From: hyemyn2 Date: Tue, 26 Mar 2024 14:29:28 +0900 Subject: [PATCH 1/3] fix: add key 'color' in props --- .../src/components/DatamapsAwsRegionArc.vue | 40 +++++++++++------ .../src/components/DatamapsDataTransfer.vue | 45 +++++++++++++++++++ 2 files changed, 71 insertions(+), 14 deletions(-) create mode 100644 example/src/components/DatamapsDataTransfer.vue diff --git a/example/src/components/DatamapsAwsRegionArc.vue b/example/src/components/DatamapsAwsRegionArc.vue index aecdb36..4da697e 100644 --- a/example/src/components/DatamapsAwsRegionArc.vue +++ b/example/src/components/DatamapsAwsRegionArc.vue @@ -21,7 +21,8 @@ From d8d5cdf1301a7d11f67c778a30119384e52ca830 Mon Sep 17 00:00:00 2001 From: hyemyn2 Date: Tue, 26 Mar 2024 14:33:51 +0900 Subject: [PATCH 2/3] fix: add key 'color' in props --- src/components/LayerArc.vue | 3 ++- src/components/LayerAwsRegions.vue | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/LayerArc.vue b/src/components/LayerArc.vue index 6b1fc17..1ae0f23 100644 --- a/src/components/LayerArc.vue +++ b/src/components/LayerArc.vue @@ -31,6 +31,7 @@ export default { return { origin: item.origin, destination: item.destination, + color: item.color, ...item.options } }) @@ -45,7 +46,7 @@ export default { styles (datum, index) { const data = { strokeLinecap: 'round', - stroke: val(datum.strokeColor, this.options.strokeColor, datum), + stroke: datum.color || val(datum.strokeColor, this.options.strokeColor, datum), fill: 'none', strokeWidth: val(datum.strokeWidth, this.options.strokeWidth, datum) } diff --git a/src/components/LayerAwsRegions.vue b/src/components/LayerAwsRegions.vue index 20785cd..a5bbd82 100644 --- a/src/components/LayerAwsRegions.vue +++ b/src/components/LayerAwsRegions.vue @@ -66,15 +66,15 @@ export default { }, innerStyles (datum, index) { return { - stroke: val(datum.borderColor, this.options.borderColor, datum), + stroke: datum.color || val(datum.borderColor, this.options.borderColor, datum), strokeWidth: val(datum.borderWidth, this.options.borderWidth, datum), - fill: this.options.fills[val(datum.fillKey, this.options.fillKey, datum)] || 'transparent', + fill: datum.color || this.options.fills[val(datum.fillKey, this.options.fillKey, datum)] || 'transparent', fillOpacity: val(datum.borderOpacity, this.options.borderOpacity, datum) } }, outerStyles (datum, index) { return { - stroke: val(datum.borderColor, this.options.borderColor, datum), + stroke: this.options.borderColor || datum.color || val(datum.borderColor, this.options.borderColor, datum), strokeWidth: val(datum.borderWidth, this.options.borderWidth, datum), fill: 'transparent', fillOpacity: val(datum.borderOpacity, this.options.borderOpacity, datum) From 506a22adcc9bb44f579280e0759a7a66784e4b71 Mon Sep 17 00:00:00 2001 From: hyemyn2 Date: Tue, 26 Mar 2024 14:34:00 +0900 Subject: [PATCH 3/3] fix: remove popup text in slot --- src/components/Datamaps.vue | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/src/components/Datamaps.vue b/src/components/Datamaps.vue index 5994f2c..958773c 100644 --- a/src/components/Datamaps.vue +++ b/src/components/Datamaps.vue @@ -54,33 +54,10 @@ style="z-index:10001;position:absolute" :style="popupPosition" > - -
- - {{ popupText.title }} - -
- -
- -
- - {{ popupText.title }} - -
-
- -
- {{ popupText.title }}
- {{ popupText.origin }} -> {{ popupText.destination }} - {{ popupText.value }} -
-
- -
- {{ popupText.title }}
-
-
+ + + + @@ -156,7 +133,7 @@ export default { }, computed: { regions () { - return (this.awsRegions && this.awsRegionsConfig.region) || regions + return this.awsRegionsConfig.region || regions }, isPopupOn () { return (this.geograpphyConfigOptions.popupOnHover || this.bubblesConfigOptions.popupOnHover) && (this.showHoverInfo || this.showHoverBubbleInfo || this.showHoverArcInfo || this.showHoverRegionInfo)