Skip to content

Commit

Permalink
Fix #1079 map: spotStyle not applied
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Sep 12, 2023
1 parent c7d299b commit 77adf7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/map-plugin/src/MapPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@ const getConfig = utils.getConfigParser<MapPluginConfig, ParsedMapPluginConfig>(
}
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`);
// @ts-ignore
spotStyle[newName] = rawConfig[oldName];
}
});
return spotStyle;
return { ...defValue, ...spotStyle };
},
position: (position, { defValue }) => {
return utils.cleanCssPosition(position, { allowCenter: false, cssOrder: true }) || defValue;
Expand Down

0 comments on commit 77adf7f

Please sign in to comment.