thebird / Swipe

Swipe is the most accurate touch slider.
MIT License
6.79k stars 1.69k forks source link

i have a question about 'offloadFn' #350

Open yeso opened 11 years ago

yeso commented 11 years ago
  switch (event.type) {
    case 'touchstart': this.start(event); break;
    case 'touchmove': this.move(event); break;
    case 'touchend': offloadFn(this.end(event)); break;
    case 'webkitTransitionEnd':
    case 'msTransitionEnd':
    case 'oTransitionEnd':
    case 'otransitionend':
    case 'transitionend': offloadFn(this.transitionEnd(event)); break;
    case 'resize': offloadFn(setup.call()); break;
  }

setup.call() return nothing, so offloadFn() do nothing?

trose commented 11 years ago

Yeah, that is odd. I think the point of offloadFn is to not .call() functions directly. Have you tried removing it?