angular-dynamic-layout
angular-dynamic-layout copied to clipboard
Proposing new feature: a way to have an item always centered horizontaly
I'm working on a project where this need is being presenting.
I look at the code and a way to do it could be:
- to have an attribute, 'centerH-parent' in the first children (as is the first child that is used to calc the width)
- have a new property in each object in items to reflect that attr: item: { height:..., width:..., centerH: true|false }
- pass in to setItemsPosition call the containerWidth parameter line 167
- and in setItemsPosition function test the value in item.centerH and do the calc
Do you think this is interesting?
The attribute name: dynamic-layout-centerH
Thanks for the input but I'd like to keep the library as simple as possible. Also I'm not sure this is compatible with the current column system in place.
I see...Thanks anyway.