nativescript-ngx-slides
nativescript-ngx-slides copied to clipboard
Default width does not consider padding/margin of parent view
When computing the width of the slides it does not consider the width of the layout containing the tag <slides>
, e.g., padding or margin. A workaround is to set the slide width explicitly (thanks for providing this attribute) but it would be more convenient if this could be done automatically.
Unfortunately, I haven't found a way to get the width of the parent layout yet. I hope that you just know how to deal with it :-)
The following example demonstrates the effect:
<StackLayout style="padding:40">
<Label text="Slide 1" textWrap="true" textAlignment="center"></Label>
<slides loop="true" pageIndicators="true">
<slide class="slide slide-1">
<Label text="Slide 1" textWrap="true" textAlignment="center"></Label>
</slide>
</slides>
</StackLayout>
Any news here? Seems like I'm having the same problem.
same
Any solution/workaround?