From 77adf7fcaed62a0ab030ac1ceb5bd6438c7380d2 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 12 Sep 2023 18:27:18 +0200 Subject: [PATCH] Fix #1079 map: spotStyle not applied --- packages/map-plugin/src/MapPlugin.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/map-plugin/src/MapPlugin.ts b/packages/map-plugin/src/MapPlugin.ts index 002166864..3afb168c4 100644 --- a/packages/map-plugin/src/MapPlugin.ts +++ b/packages/map-plugin/src/MapPlugin.ts @@ -55,12 +55,12 @@ const getConfig = utils.getConfigParser( } return overlayImage; }, - spotStyle: (spotStyle, { rawConfig }) => { + spotStyle: (spotStyle, { rawConfig, defValue }) => { [ ['spotColor', 'color'], ['spotImage', 'image'], ['spotSize', 'size'], - ].forEach((oldName, newName) => { + ].forEach(([oldName, newName]) => { // @ts-ignore if (rawConfig[oldName]) { utils.logWarn(`map: "${oldName}" is deprecated, use "spotStyle.${newName}" instead`); @@ -68,7 +68,7 @@ const getConfig = utils.getConfigParser( spotStyle[newName] = rawConfig[oldName]; } }); - return spotStyle; + return { ...defValue, ...spotStyle }; }, position: (position, { defValue }) => { return utils.cleanCssPosition(position, { allowCenter: false, cssOrder: true }) || defValue;