AnimationTool/app/canvas_handler.ts

18 lines
416 B
TypeScript
Raw Normal View History

2019-09-26 01:59:16 +00:00
//I display the canvas and am clickable
export class CanvasHandler {
private currentImageDiv: HTMLElement;
constructor(currentImageDiv: HTMLElement) {
this.currentImageDiv = currentImageDiv;
2019-09-26 23:28:35 +00:00
console.log(this.currentImageDiv);
2019-09-26 22:36:27 +00:00
}
public Load() {
2019-09-26 23:28:35 +00:00
const mouseDown = (event: MouseEvent) => {
console.log(event.x + ' ' + event.y);
};
2019-09-26 22:05:37 +00:00
2019-09-26 23:28:35 +00:00
this.currentImageDiv.addEventListener('mousedown', mouseDown);
2019-09-26 22:05:37 +00:00
}
2019-09-26 01:59:16 +00:00
}