Clean up
This commit is contained in:
parent
d9565e9250
commit
87072cb690
@ -6,7 +6,7 @@ import controls from './controls';
|
|||||||
import ui from './ui';
|
import ui from './ui';
|
||||||
import { repaint } from './utils/animation';
|
import { repaint } from './utils/animation';
|
||||||
import browser from './utils/browser';
|
import browser from './utils/browser';
|
||||||
import { getElement, getElements, hasClass, matches, toggleClass, toggleHidden } from './utils/elements';
|
import { getElement, getElements, matches, toggleClass, toggleHidden } from './utils/elements';
|
||||||
import { on, once, toggleListener, triggerEvent } from './utils/events';
|
import { on, once, toggleListener, triggerEvent } from './utils/events';
|
||||||
import is from './utils/is';
|
import is from './utils/is';
|
||||||
|
|
||||||
|
@ -15,9 +15,7 @@ export const transitionEndEvent = (() => {
|
|||||||
transition: 'transitionend',
|
transition: 'transitionend',
|
||||||
};
|
};
|
||||||
|
|
||||||
const type = Object.keys(events).find(
|
const type = Object.keys(events).find(event => element.style[event] !== undefined);
|
||||||
event => element.style[event] !== undefined,
|
|
||||||
);
|
|
||||||
|
|
||||||
return is.string(type) ? events[type] : false;
|
return is.string(type) ? events[type] : false;
|
||||||
})();
|
})();
|
||||||
|
@ -24,7 +24,7 @@ export function getPercentage(current, max) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (current / max * 100).toFixed(2);
|
return ((current / max) * 100).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace all occurances of a string in a string
|
// Replace all occurances of a string in a string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user