"Grid" and "Contain"

60 views
Skip to first unread message

ccove...@gmail.com

unread,
Dec 28, 2011, 11:11:37 AM12/28/11
to threed...@googlegroups.com
How can I make both of them working?

.drag(function( ev, dd ){
                    $(this).css({
                        top: Math.min(dd.limit.bottom, Math.max(dd.limit.top, dd.offsetY)),
                        left: Math.min(dd.limit.right, Math.max(dd.limit.left, dd.offsetX))
                    });
                    $(this).css({
            top: Math.round( dd.offsetY / 100 ) * 100,
            left: Math.round( dd.offsetX / 100 ) * 100
                    });
        })

The first css() is for "contain" and the second is for "grid", but how to combine them?

Thanks!


Reply all
Reply to author
Forward
0 new messages