Created
April 17, 2015 22:14
-
-
Save poteto/728bc5dc95e8342ebca6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_unbindListeners() { | |
const elementId = get(this, 'elementId'); | |
const viewportUseRAF = get(this, 'viewportUseRAF'); | |
Ember.warn('No elementId was found on this Object, `viewportSpy` will' + | |
'not work as expected', elementId); | |
if (viewportUseRAF) { | |
next(this, () => { | |
window.cancelAnimationFrame(rAFIDS[elementId]); | |
rAFIDS[elementId] = null; | |
}); | |
} | |
forEach(listeners, (listener) => { | |
const { context, event } = listener; | |
$(context).off(`${event}#${elementId}`); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment