Remove unused code

This commit is contained in:
afc163 2015-08-22 14:46:45 +08:00
parent 7ae4b4ad76
commit 781931721f

View File

@ -1,41 +0,0 @@
import { Dom } from 'rc-util';
export let transitionEndEvent = whichTransitionEvent();
export let animationEndEvent = whichAnimationEvent();
function whichTransitionEvent() {
const transitions = {
'transition': 'transitionend',
'OTransition': 'oTransitionEnd',
'MozTransition': 'transitionend',
'WebkitTransition': 'webkitTransitionEnd'
};
for (let t in transitions) {
if (t in document.documentElement.style) {
return transitions[t];
}
}
return false;
}
function whichAnimationEvent() {
const animation = {
'animation': 'animationend',
'OAnimation': 'oAnimationEnd',
'MozAnimation': 'animationend',
'WebkitAnimation': 'webkitAnimationEnd'
};
for (let t in animation) {
if (t in document.documentElement.style) {
return animation[t];
}
}
return false;
}
export let addEventListenerOnce = function(element, type, handler) {
var eventListener = Dom.addEventListener(element, type, function(event) {
eventListener && eventListener.remove();
handler(event);
});
};