packery icon indicating copy to clipboard operation
packery copied to clipboard

separate options for gutterWidth and gutterHeight

Open desandro opened this issue 12 years ago • 31 comments
trafficstars

Right now gutter is a single option that controls both the vertical gutter and horizontal gutter between item elements. Having separate options for gutterWidth and gutterHeight would allow you to control these values separately.

Please +1 if you'd like to see this feature.

desandro avatar Apr 15 '13 11:04 desandro

+1

Would be helpful for creating more ireggular grids.

oskarrough avatar Apr 15 '13 19:04 oskarrough

  • 1

That would be useful!

ChrisRollason avatar Apr 16 '13 09:04 ChrisRollason

+1

wichert avatar May 03 '13 12:05 wichert

+1

ChrisC avatar May 06 '13 18:05 ChrisC

+1

halfempty avatar Jun 10 '13 18:06 halfempty

+1

Skaidon avatar Jun 18 '13 22:06 Skaidon

+1

ghost avatar Jun 20 '13 10:06 ghost

Solution might be to give the smallest amount with the options. And provide extra needed margin via CSS for ie the bottom.

djschoone avatar Aug 15 '13 12:08 djschoone

+1

danielsamuels avatar Oct 17 '13 17:10 danielsamuels

+1

bradjonesca avatar Oct 18 '13 00:10 bradjonesca

+1

Scritik avatar May 17 '14 22:05 Scritik

+1

rodleviton avatar Jul 02 '14 07:07 rodleviton

I would love to have this feature, too - I am using packery in a responsive layout and smaller boxes stacked upon each other don't align with the taller boxes, just as in http://codepen.io/desandro/pen/pBlIw

2014-09-16_10-26-54

mgrn0 avatar Sep 16 '14 08:09 mgrn0

I tried to extend packery with a gutterHeight option for responsive layouts and it seems to almost work, at least with pixel values. When you resize http://codepen.io/magrolino/pen/yGdzk the vertical Gutter stays the same and is different from the horizontal gutter.

However, when I drag and drop the tiles vertically, the more I drag an item the more it is positioned too far down (like I missed taking the vertical gutter being taken into account when positioning / dragging an element to a new position, after window resize it fits again).

Am i completely off or is there a possible solution out there, at least with fixed pixel values?

p.s.: please forgive the brute approach for extending the options...

mgrn0 avatar Sep 24 '14 10:09 mgrn0

I did not add a fallback (yet) when no gutterHeight is provided, but resizing in both directions works and so does browser-resizing, too. But I have a problem in combination with dragabilly - drag (and drop) within first row works perfectly, but in rows > 1 the positioning is off, like there is an additional padding / gutter added to the drop target (and I cannot find out where). I tried to show the behaviour in a screencast, I used a gutterHeight of 20px (you can see in the very narrow window-width that the gutterHeight is different from width, which is 2%):

https://dl.dropboxusercontent.com/u/81358/jing/packery-gutterHeight-bug.mp4

Fun thing: if I position a tile "wrong", resizing the browser window re-places it correctly. Can somebody point me in the right direction?

mgrn0 avatar Oct 06 '14 09:10 mgrn0

+1

matthewwilson avatar Feb 24 '15 22:02 matthewwilson

+1

johnnyjanzen avatar May 29 '15 22:05 johnnyjanzen

+1 pretty please

kaisermann avatar Jun 02 '15 16:06 kaisermann

+1, with ice cream on top

john-osullivan avatar Jul 03 '15 03:07 john-osullivan

+1

Luxbit avatar Nov 09 '15 13:11 Luxbit

+1

echibi avatar Jan 14 '16 07:01 echibi

+1

avdeev avatar Feb 08 '16 13:02 avdeev

+100500

lexgorbunov avatar Feb 25 '16 13:02 lexgorbunov

+1

mprofitlich avatar Mar 21 '16 21:03 mprofitlich

Can everyone please stop adding +1 comments to this ticket? At this point they add no useful value, and they only cause a lot of useless email to be send to everyone.

@desandro, perhaps you can lock this discussion?

wichert avatar Mar 22 '16 05:03 wichert

+1 to what wichert said

matthewwilson avatar Mar 22 '16 09:03 matthewwilson

+1

iliyaZelenko avatar Mar 25 '16 15:03 iliyaZelenko

+1

axit-joost avatar Mar 31 '16 09:03 axit-joost

It appear that this feature would be really helpfull. I think this space cannot be in percent vertically speaking because we never sizing the grid item with a percent value for height. After almost 3 years, where is this wonderful feature ?? Or is there anyway to disactivate the vertical gutter and manage it by ourselves ?

And by the way : +1 :)

MrGrabazu avatar Jun 08 '16 07:06 MrGrabazu

+1

JRadagast avatar Mar 19 '19 18:03 JRadagast