jakiestfu / Snap.js

A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)
http://jakiestfu.github.io/Snap.js/
5.99k stars 663 forks source link

snapper.state().state returns "closed" with drawer open (while zoomed in) #223

Open benlinton opened 10 years ago

benlinton commented 10 years ago

When zoomed in (cmd+'+') snapper.state().state returns "closed" when the drawer is open. Setting the screen size back to the default (cmd+0) fixes it.

Reproduced on chrome v34 and v36.0.1985.125 Browser: Chrome 34+ OS: OS X

lesander commented 10 years ago

Not sure if this is a bug. After all, the 'open' drawer isn't visible in the viewport while zoomed in like that.

benlinton commented 10 years ago

In my experience, when I zoom in once (with cmd+'+') - the page looks slightly larger, the 'open' drawer is entirely visible in the viewport, and snapper.state().state returns "closed".

On Wed, Jul 30, 2014 at 4:35 PM, Sander Laarhoven notifications@github.com wrote:

Not sure if this is a bug. After all, the 'open' drawer isn't visible in the viewport while zoomed in like that.

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Snap.js/issues/223#issuecomment-50683534.

lesander commented 10 years ago

Ah, well I think that's because Snap.js doesn't redraw to window size changes live. It's documented (somewhere, can't remember). Reloading the page with the custom window size should solve your problem, however I'm not sure if that's also the case while zoomed in.

benlinton commented 10 years ago

I encounter the issue even after reloading the page, for example:

On Thu, Jul 31, 2014 at 2:04 AM, Sander Laarhoven notifications@github.com wrote:

Ah, well I think that's because Snap.js doesn't redraw to window size changes live. It's documented (somewhere, can't remember). Reloading the page with the custom window size should solve your problem.

— Reply to this email directly or view it on GitHub https://github.com/jakiestfu/Snap.js/issues/223#issuecomment-50722077.

johnmn3 commented 9 years ago

It is also returning "closed" while in landscape mode on an android phone.