vmitsaras/js-offcanvas

Destroy method/way to disable on criteria, e.g. screen sizes?

Ambient-Impact opened this issue · 1 comments

Hi there. I'm messing around with this, and overall it works great, but I've run into an issue: I'm trying to use this as an enhancement for sidebars only on smaller screens. On larger screens the sidebars are usually placed on either side of the content, and having them off canvas isn't useful. There doesn't seem to be any way to destroy the off canvas functionality that I can see, or have it only apply at certain screen sizes - which is ultimately what I'd be doing. Any chance of a destroy method or way to disable this on certain criteria, so content is displayed as it would be before it was modified by this?

I'm using AppendAround, to move Elements depending on the viewport, into the offcanvas-panels
(See Bootstrap Starter Template ). I hope it helps.

The destroy-method will be later implemented.

https://github.com/filamentgroup/AppendAround
https://codepen.io/vmitsaras/pen/veyJmv