JoshDSommer / nativescript-ngx-slides

A NativeScript + Angular module for to add a slides component to your mobile app
Other
45 stars 34 forks source link

pageheight is incorrect #52

Closed RoyiNamir closed 6 years ago

RoyiNamir commented 6 years ago

Looking at this simple example :

<slides [loop]="false" [pageIndicators]="false" pageHeight="500">
    <slide class="slide-1">
        <Label text="Slide 13" textWrap="true"></Label>
    </slide>
    <slide class="slide-2">

        <GridLayout rows="*,*,*" columns="*,*,*" backgroundColor="#00ffff">
            <Label text="Slide 2" row="0" col="2" backgroundColor="#010101"></Label>
            <Label text="Slide 2" row="1" col="2" backgroundColor="#ff0101"></Label>
            <Label text="Slide 2" row="2" col="2" backgroundColor="#01ff01"></Label>
        </GridLayout>

    </slide>
    <slide class="slide-3">
        <Label text="Slide 3" textWrap="true"></Label>
    </slide>
</slides>

we can see that at the second slide we define 3 equal heights , differnt colors. Notice the temporary pageHeight="500" :

REsult :

image

But now let's remove pageHeight="500":

Now we see that result is - non symmetric heights :

image

all 3 colors should be the same height ( which is height/3).

RoyiNamir commented 6 years ago

Update : fix is that :

   slide.slideHeight = "100%";

rather than mainscreen.heightDip :

image