nativescript-ngx-slides icon indicating copy to clipboard operation
nativescript-ngx-slides copied to clipboard

Default width does not consider padding/margin of parent view

Open heese opened this issue 7 years ago • 3 comments

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>

heese avatar May 29 '17 20:05 heese