angular2gridster icon indicating copy to clipboard operation
angular2gridster copied to clipboard

Add "Compact layout" option

Open vlodko opened this issue 8 years ago • 8 comments

If you've heard about Packery or similar project, they feature called layout packing - algorithm puts items together removing any gaps between them.

Please, see demo here: [https://tiberiuzuld.github.io/angular-gridster2/angular/] There is an option called Compact type.

Do you have any plans regarding this feature?

It would very useful in our current project. Thanks.

vlodko avatar Sep 08 '17 22:09 vlodko

Hi, "Compact type" option (top/left/...) in angular-gridster2 is by default turned on in angular2gridster - it's called "direction" (vertical/horizontal). It's like gravity to top or to left (or both). When it comes to layout packing algorithm in Packery, I think it's something different - like your wrote - it's removing any gaps between items. This is more complex feature. I will add your suggestion to project road map, because it's good idea, but I can not say for now when it will be implemented. If you have any other questions or suggestions, feel free to ask.

swiety85 avatar Sep 09 '17 11:09 swiety85

It would be great to have ETA for that feature. Thanks for quick reply!

vlodko avatar Sep 10 '17 05:09 vlodko

I can try to do it till the end of this year.

swiety85 avatar Sep 13 '17 11:09 swiety85

Sounds reasonable, thank you @swiety85

vlodko avatar Sep 13 '17 16:09 vlodko

Hi, unfortunately I will not be able to deliver this feature till the end of this year. I have many urgent things to do and it's hard to say when exactly this feature will be delivered.

swiety85 avatar Dec 13 '17 08:12 swiety85

@swiety85 sorry to hear that. But thanks for response anyway. One more question: are you going to support all four edges for resizing card?

vlodko avatar Dec 13 '17 17:12 vlodko

Yes, angular2gridster supports resizing in all direction. There is a small bug when resizing in north direction, but will be fixed soon. Besides that you can control in which direction resize will be possible by following gridster option:

resizeHandles: {
      s: true,
      e: true,
      n: true,
      w: true,
      se: true,
      ne: true,
      sw: true,
      nw: true
    }

About this layout packing - if you would have this algorithm, I'm sure it's quite ease to apply it on items configuration in your code, outside of the gridster component.

swiety85 avatar Dec 13 '17 22:12 swiety85

@swiety85 that's nice. But I would update the demo page to all possible options.

vlodko avatar Dec 13 '17 23:12 vlodko