angular-dynamic-layout icon indicating copy to clipboard operation
angular-dynamic-layout copied to clipboard

Proposing new feature: a way to have an item always centered horizontaly

Open borntorun opened this issue 10 years ago • 3 comments

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?

borntorun avatar Nov 18 '15 13:11 borntorun

The attribute name: dynamic-layout-centerH

borntorun avatar Nov 18 '15 23:11 borntorun

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.

tristanguigue avatar Nov 21 '15 14:11 tristanguigue

I see...Thanks anyway.

borntorun avatar Nov 24 '15 16:11 borntorun