Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private bindCanvasEvents() {
const containerDOM = this.get('canvas').get('containerDOM');
const e1 = domUtil.addEventListener(containerDOM, 'mousemove', this.onMouseMove);
const e2 = domUtil.addEventListener(containerDOM, 'mouseup', this.onMouseUp);
const e3 = domUtil.addEventListener(containerDOM, 'mouseleave', this.onMouseUp);
// 清除所有事件的方法,在交互结束的时候执行
this.clearAllEvents = () => {
e1.remove();
e2.remove();
e3.remove();
};
}
private bindCanvasEvents() {
const containerDOM = this.get('canvas').get('containerDOM');
const e1 = domUtil.addEventListener(containerDOM, 'mousemove', this.onMouseMove);
const e2 = domUtil.addEventListener(containerDOM, 'mouseup', this.onMouseUp);
const e3 = domUtil.addEventListener(containerDOM, 'mouseleave', this.onMouseUp);
// 清除所有事件的方法,在交互结束的时候执行
this.clearAllEvents = () => {
e1.remove();
e2.remove();
e3.remove();
};
}
private bindCanvasEvents() {
const containerDOM = this.get('canvas').get('containerDOM');
const e1 = domUtil.addEventListener(containerDOM, 'mousemove', this.onMouseMove);
const e2 = domUtil.addEventListener(containerDOM, 'mouseup', this.onMouseUp);
const e3 = domUtil.addEventListener(containerDOM, 'mouseleave', this.onMouseUp);
// 清除所有事件的方法,在交互结束的时候执行
this.clearAllEvents = () => {
e1.remove();
e2.remove();
e3.remove();
};
}