Skip to content

Commit

Permalink
fix map: allows null overlayImage
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jul 24, 2024
1 parent 4744fd6 commit 2d8b0eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/map-plugin/src/MapPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const getConfig = utils.getConfigParser<MapPluginConfig, ParsedMapPluginConfig>(
size: '200px',
position: ['bottom', 'left'],
visibleOnLoad: true,
overlayImage: null,
overlayImage: undefined,
pinImage: pin,
pinSize: 35,
coneColor: '#1E78E6',
Expand Down
3 changes: 2 additions & 1 deletion packages/map-plugin/src/components/MapComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ export class MapComponent extends AbstractComponent {
this.container.style.width = this.config.size;
this.container.style.height = this.config.size;

this.overlay.innerHTML = getImageHtml(this.config.overlayImage ?? (this.config.shape === 'square' ? overlaySquare : overlayRound));
this.overlay.innerHTML = this.config.overlayImage === null ? ''
: getImageHtml(this.config.overlayImage ?? (this.config.shape === 'square' ? overlaySquare : overlayRound));

this.resetButton?.applyConfig();
this.closeButton?.applyConfig();
Expand Down

0 comments on commit 2d8b0eb

Please sign in to comment.