mukaschultze / nativescript-windowed-modal

Consistent modals for Android and iOS
https://www.npmjs.com/package/nativescript-windowed-modal
Apache License 2.0
47 stars 18 forks source link

Background opacity (dimAmount) not working on iOS #25

Closed Tyler-V closed 4 years ago

Tyler-V commented 4 years ago

Which platform(s) does your issue occur on?

Is there any code involved?

.modal {
  margin: 20;
  margin-top: 35;
  border-radius: 8;
  horizontal-align: center;
  vertical-align: middle;
  background-color: white;
}

.modal-container {
  padding: 25;
  padding-bottom: 10;
}
  showMapLayers() {
    const options = {
      viewContainerRef: this.vcRef,
      fullscreen: false,
      dimAmount: 0.5,
    };

    return this.modalDialogService.showModal(MapStylesComponent, options);
  }
<ModalStack dismissEnabled="true" class="modal-container">
  <StackLayout class="modal">
    <AbsoluteLayout width="100%" height="50" style="border-bottom-color: #DDD; border-bottom-width: 1;">
      <StackLayout orientation="horizontal" width="100%" height="100%">
        <Label text="Map Styles" fontSize="20" fontWeight="bold" width="100%" textAlignment="center" verticalAlignment="center"></Label>
      </StackLayout>
    </AbsoluteLayout>
    <StackLayout class="p-10">
      <StackLayout>
        <Button text="Streets" class="-primary" (tap)="setStyle(MapStyle.MAPBOX_STREETS)"></Button>
        <Button text="Terrain" class="-primary" (tap)="setStyle(MapStyle.OUTDOORS)"></Button>
        <Button text="Satellite" class="-primary" (tap)="setStyle(MapStyle.SATELLITE_STREETS)"></Button>
      </StackLayout>
    </StackLayout>
  </StackLayout>
</ModalStack>

image

image

Tyler-V commented 4 years ago

Setting the backgroundColor as transparent on the modal-container allows me to show the background content once again but I'm unable to add an opaque background.

<ModalStack dismissEnabled="true" class="modal-container" backgroundColor="transparent">
  <StackLayout class="modal">
  ...

image

Tyler-V commented 4 years ago

Fixed, https://github.com/mukaschultze/nativescript-windowed-modal/pull/26

Tyler-V commented 4 years ago

@mukaschultze @CalebJTSmith @lochstar @edusperoni

juanm4 commented 4 years ago

Hi, I want give thanks to @Tyler-V for this fix. I am using nativescript vue and I would to know if this merge is going to be done soon. If not, I would like to know if is possible to install this library pointing to @Tyler-V master branch for a temporal fix.

¿Are there something that make that the library in my package.json point to this pull?

Thanks and kind regards!

lochstar commented 4 years ago

@juanm4 You can point directly to a git branch in your package.json. Here's an article that may help.

juanm4 commented 4 years ago

@lochstar Thanks for info, but unfortunately in this library there isn't a package.json in the root path. So, when you try to install npm install --save Tyler-V/nativescript-windowed-modal#master it fails.

Any suggestion to fix it? Thanks!

Tyler-V commented 3 years ago

Looks like some regression was introduced in the latest update @mukaschultze @CalebJTSmith @lochstar @edusperoni

Can we reopen this issue? Or should I make a new one, this is appearing in Android on NS7 now.

    showMapLayers() {
        const options = {
            viewContainerRef: this.vcRef,
            animated: false,
            fullscreen: true,
            dimAmount: 0.5,
        };

        return this.modalDialogService.showModal(MapStylesComponent, options);
    }

Screenshot_20210216-164639