dragdealer icon indicating copy to clipboard operation
dragdealer copied to clipboard

Method to set the Dragdealer to initial state

Open jonnitto opened this issue 11 years ago • 1 comments

I need to set new Dragdealer options on window resize. Is there a method to set everything back to initial state?

jonnitto avatar Mar 03 '15 12:03 jonnitto

There is the init()-method. I don't think it's documented but at least for us it seems to be working fine to reset the number of steps:

// [...]
var dragDealer = new Dragdealer(someDomElem,someConfig);
// [...]
function reset(newNumberOfSteps) {
  dragDealer.options.steps = newNumberOfSteps
  dragDealer.init();
}
// [...]

flosell avatar Mar 03 '15 20:03 flosell