I've managed to combine snap.js with enquire.js to dinamically update drawer's width. While working on this setup I found that settings need to be called like:
snapper.settings.maxPosition = 123;
and the same goes for the state property:
var data = snapper.state();
if (data.state == "right") {
snapper.close();
}
Docs are not clear about that, at least for me. So, while this may be obvious for some senior js dev, I'm sharing my findings for the rest of us ; )
I've managed to combine snap.js with enquire.js to dinamically update drawer's width. While working on this setup I found that
settings
need to be called like:and the same goes for the state property:
Docs are not clear about that, at least for me. So, while this may be obvious for some senior js dev, I'm sharing my findings for the rest of us ; )