Skip to content

Commit

Permalink
fix: fix defaults from constants being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
josias-r committed Sep 16, 2024
1 parent 8bbb117 commit a721c92
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/core/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,14 @@ class Overlay {

constructor(options: OverlayOptions) {
this.options = {
// padding: Padding default will come from outside, as it affects more then just the overlay
opacity: OVERLAY_OPACITY,
overlayColor: OVERLAY_FILL_COLOR,
...options,
opacity:
options.opacity === undefined ? OVERLAY_OPACITY : options.opacity,
overlayColor:
options.overlayColor === undefined
? OVERLAY_FILL_COLOR
: options.overlayColor,
// padding: Padding default will come from outside, as it affects more then just the overlay
};
}

Expand Down

0 comments on commit a721c92

Please sign in to comment.