Disabling swipe with pages

Hi there,
I have arrows to use to move between pages. Is it possible to disable the swipe option so only the arrows can be used to transition between pages.

This is my code at the moment (with the swipe option working)...

const page1=new Page(1080,645,white);
const page2=new Page(1080,645,white)
const satsun=zimify(this.satsun);
const pages = new Pages([page1,page2], "bubbleZIM",1).addTo();

If it can be done, where is the command to cancel the swipe placed?

Thanks for help (loving this stuff)!!!!

Rod

1 Like

Yes - setting a swipe property of a page object to an empty array - or use the disable() method or active property.

new Pages([{page:page1, swipe:[]}, page2, page3, page4], "slide").addTo()
// or 
new Pages([page1,page2, etc.], "slide").addTo().disable();
// or 
const pages = new Pages([page1,page2, etc.], "slide").addTo();
pages.active = false;

Yes! Coding with ZIM is very fun. Glad you are here, ask any questions you come across!

1 Like

I have this working now - thanks so much for the help.
Rod

1 Like