OpenBuildings / layout-grid

Static responsive grid with pure css. Javascript using native drag-n-drop to reorder for each screen size on desktop and mobile.
http://clippings.github.io/layout-grid/
BSD 3-Clause "New" or "Revised" License
801 stars 46 forks source link

Small bug in docs and touch drag solution #19

Closed kosirm closed 6 years ago

kosirm commented 7 years ago

Hi, there is a small bug in documentation example Resize grid items demo. If you resize browser window to XS size and click on 2x2 resize button, widget will get streched (because it already occupies all width, I think). I also had problem to move (drag&drop) items with hand on my laptop touchscreen (with mouse it works perfectly), window get scrolled, etc. so drag&drop was not possible (with touch). I added simple css rule to custom.css:

/*
Set the touch-action CSS property to none, which works even with passive event listeners.
Applying this property to an element will not trigger the default (scroll)
behavior when the event is originating from that element.
*/
.lt {touch-action: none;}

Problem solved. It's too small for PR, but it is something :)

ivank commented 7 years ago

Don't worry nothing is too small for a PR and it would be great for all of us - bugs fixed and credit given where it is due :) I've just tested it myself and you are absolutely right it is a problem and it is fixed as easily as adding a sass rule.

screen shot 2017-11-29 at 21 08 58

So we would really appreciate a PR with this change :) You could even reference it by typing closes #19 in the commit message itself, so that its referenced here and the github automation does its magic :)

kosirm commented 7 years ago

Thanks, you are really kind :) I've been exploring this library last days and more I work with it more I like it. It's kinda right tool for the right job library and this is something I extremely appreciate. I promisse next time I will do PR :)