Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label textWrap not working in Slide #52

Open
burkeholland opened this issue Jul 12, 2016 · 9 comments
Open

Label textWrap not working in Slide #52

burkeholland opened this issue Jul 12, 2016 · 9 comments

Comments

@burkeholland
Copy link

Great plugin! Had no issues getting this setup and working with Angular 2.

Currently, it doesn't seem like textWrap works for Labels that are placed in slides.

Steps to reproduce...

Use the following markup...

<StackLayout>
    <SlideContainer angular="true" #slides>
        <Slide>
            <Label textWrap="true" class="p" text="this is a test of some static long text to see whether or not the wrapping actually works"></Label>                            
        </Slide>
    </SlideContainer>
</StackLayout>

Result

Text is remains on the same line and is truncated at the edge of the screen.

Expected Behavior

Text on the label should wrap to the next line.

label-wrapping- n -slides

If you take that same label out of the Slide container and display it, it wraps correctly.

@JoshDSommer
Copy link
Owner

Hey @burkeholland Thanks for bringing this to my attention, Do you know if this is happening as well in android or if it's a iOS only behavior?

Also I was thinking about it and do you have a fixed width set on the label? even something like 100%? I'm thinking that may need to be the case and it has to do with the width of the slide not affecting the label inside.

Keep me posted and I'll check it out more tonight.

@burkeholland
Copy link
Author

Done some digging and I've determined that this is actually a function of the SlideContainer extending the AbsoluteLayout. Labels do not wrap in AbsoluteLayouts. I'm going to investigate this further to see if this is expected or an issue with that layout container.

@JoshDSommer
Copy link
Owner

Hmm, I actually don't think I need the absolute layout anymore and may try to instead have it just extend the stack layout in the next release.

@JoshDSommer
Copy link
Owner

I take that back I need the absolute layouts. Did you find out anything about it being an issue or expected?

@BMwanza
Copy link

BMwanza commented Nov 1, 2018

Any update on this?
Having the same issue as of right now

@BMwanza
Copy link

BMwanza commented Nov 1, 2018

Or is there some kind of way to work around this? Great plug by the way!

@yoat
Copy link

yoat commented Nov 1, 2018

The example code has a Label immediately inside the Slide. It may be using AbsoluteLayout, maybe not. Regardless, I have gotten textWrap working in my slides by putting a StackLayout inside the Slide, wrapping the Label.

Maybe a GridLayout would work, I don't know, but StackLayout does.

I used slightly different syntax, but it all comes out the same:

<StackLayout row="1"> <slides #slides> <slide class="slide-1"> <StackLayout> <Label class="content" text="Long wrapping text. Long wrapping text. Long wrapping text. Long wrapping text. Long wrapping text." textWrap="true"></Label> </StackLayout> </slide> ...

@BMwanza
Copy link

BMwanza commented Nov 1, 2018

Okay so you put the label wrapped inside a Stack layout? would you be able to send me the sample xml file?

@BMwanza
Copy link

BMwanza commented Nov 1, 2018

@yoat Oh never mind I got it working thanks so much man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants