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

feature: advanced gravity (compactType) options

Open Dimanoid opened this issue 3 years ago • 4 comments

It would be nice to have more then hor/vert gravity options. Especially combined hor+vert, like: export type CompactType = ('top' | 'left' | 'right' | 'bottom' | 'top-left' | 'left-top' | 'right-bottom' .......) | null | undefined;

Dimanoid avatar Mar 10 '22 13:03 Dimanoid

IMO, this would be just a nice to have, but not much people would end up using it, what do you think? Can you explain some use cases for those new gravity options?

The purpose of this library is to have an excellent layout tool for dashboard components. Dashboard components are not meant to be set in all this gravity options. Said that Angular-grid-layout is not closed for only dashboards components, but for now, it is its purpose. In order to add this functionality, we need to find first real use cases. If we find real use cases and more users are pushing for this feature, this feature would be able to be added.

llorenspujol avatar Mar 25 '22 08:03 llorenspujol

Because if you have for example 'vertical' compact type you can end up with this layout image that looks really strange for me.

Dimanoid avatar Mar 30 '22 11:03 Dimanoid

This layout may look strange, I agree, but it is just the way you position it. What you need to do is manually position each item the way you want. Having other gravity options would not help in this case. So, this layout example, IMO, is not a reason to put all those gravity options.

llorenspujol avatar Apr 06 '22 13:04 llorenspujol

i would also be interested in such a feature. maybe "gravity" is the wrong word. Also, I think a lot of people would use this functionality because it's much more convenient to be able to switch components horizontally AND vertically in the layout. By this I mean: you move a component from left to right and then the positions are swapped with the right one. But exactly the same also only vertically. A "CompactType" with "both" would be very nice here.

lennybakkalian avatar Feb 14 '23 14:02 lennybakkalian