AnimationTool/app/canvas_handler.ts

23 lines
608 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 22:05:37 +00:00
this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage);
this.currentImageDiv.addEventListener('onmouseover', this.hoverOverImage);
2019-09-26 01:59:16 +00:00
}
2019-09-26 22:05:37 +00:00
// public Load() {
// this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage);
// }
private hoverOverImage() {
console.log('hovering over image');
}
private clickOnImage = (e: Event) => {
console.log('Clicked on image');
};
2019-09-26 01:59:16 +00:00
}