Remove event
parent
a02bc42b8e
commit
47ef4d9d8e
|
@ -2,12 +2,10 @@ import DomHandler from '../utils/DomHandler';
|
||||||
|
|
||||||
function bindEvents(el) {
|
function bindEvents(el) {
|
||||||
el.addEventListener('mousedown', onMouseDown);
|
el.addEventListener('mousedown', onMouseDown);
|
||||||
el.addEventListener('mouseleave', onMouseLeave);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function unbindEvents(el) {
|
function unbindEvents(el) {
|
||||||
el.removeEventListener('mousedown', onMouseDown);
|
el.removeEventListener('mousedown', onMouseDown);
|
||||||
el.removeEventListener('mouseleave', onMouseLeave);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function create(el) {
|
function create(el) {
|
||||||
|
@ -50,18 +48,6 @@ function onMouseDown(event) {
|
||||||
DomHandler.addClass(ink, 'p-ink-active');
|
DomHandler.addClass(ink, 'p-ink-active');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseLeave(event) {
|
|
||||||
resetInk(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetInk(event) {
|
|
||||||
let target = event.target;
|
|
||||||
let ink = getInk(target);
|
|
||||||
if (ink) {
|
|
||||||
DomHandler.removeClass(ink, 'p-ink-active');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onAnimationEnd(event) {
|
function onAnimationEnd(event) {
|
||||||
DomHandler.removeClass(event.currentTarget, 'p-ink-active');
|
DomHandler.removeClass(event.currentTarget, 'p-ink-active');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue