This might be outside the intended scope of the library but I thought I'd point out that the code which adds and removes snapjs-* classes to the body assumes there is only one snapper object operating on the page. This creates issues when I have multiple snappers and the state of the last one to be toggled doesn't reflect the state of the page as a whole.
Of course this gets even messier if the snappers aren't open to the same side... not sure why anyone would want to do that but there you have it. I don't have a great solution to propose other than perhaps just assigning the snapjs-* classes to the element tied to the snapper object.
This might be outside the intended scope of the library but I thought I'd point out that the code which adds and removes snapjs-* classes to the body assumes there is only one snapper object operating on the page. This creates issues when I have multiple snappers and the state of the last one to be toggled doesn't reflect the state of the page as a whole.
Here's a demo to illustrate: http://jsbin.com/pakud/8
Of course this gets even messier if the snappers aren't open to the same side... not sure why anyone would want to do that but there you have it. I don't have a great solution to propose other than perhaps just assigning the snapjs-* classes to the element tied to the snapper object.