Flexbox component / layout

Forum to discuss the new web client version of Servoy.

Flexbox component / layout

Postby jesse » Tue Aug 01, 2017 10:42 am

Hello all,

I have been fiddling with the NGClient a bit lately. Because I have found it relatively hard to implement a responsive layout that caters to my needs, I wanted to make my life easier and create a flexbox component. (flexbox vs float layout: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Advanced_layouts_with_flexbox )

The flexbox component I had in mind would be regular component that you can drag and drop from the palette and you would be able to set flexbox-css properties like flex-direction, justify-content, align-items, etc from the properties tab. It should also be possible to drop other components into the flexbox.

I thought I'd add the component to my Component Package, but in my understanding Web Components cannot contain other components, am I right?

I also looked into creating my own Layout Package and a flexbox Layout Component in there, but I found out that a Layout Component is not a full Angular directive, but actually just a div with a class. Am I right that this will also not work, because there's no way to pass down properties to the div?

Does anyone else have other ideas about this?

Best,

Jesse
jesse
 
Posts: 8
Joined: Tue Sep 01, 2015 12:12 pm

Re: Flexbox component / layout

Postby jesse » Tue Aug 01, 2017 11:52 am

At the moment I'm managing to achieve what I want, by using the customDiv component and adding a style attribute.. Not the prettiest solution, but it definitely makes my life a lot easier :P
jesse
 
Posts: 8
Joined: Tue Sep 01, 2015 12:12 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 2 guests