jakiestfu/Snap.js — pull request #68 by prud (2013-06-05 08:48:31+00:00)
Title: Set DOM element as min/maxPosition for dynamic drawer width

Adds the possibility to have a DOM element instead of a static number as minPosition / maxPosition to always use the current width when opening the drawer. This is crucial when the width of your navigation drawer can change, e.g. when having a bigger navigation on tablets.

usage:

var snapper = new Snap({
element: document.getElementById('content'),
maxPosition: document.getElementById('snap-drawer-left'),
minPosition: document.getElementById('snap-drawer-right')
});