AnimationTool/app/canvas_handler.ts

22 lines
524 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:36:27 +00:00
}
public Load() {
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
private hoverOverImage() {
console.log('hovering over image');
}
private clickOnImage = (e: Event) => {
console.log('Clicked on image');
};
2019-09-26 01:59:16 +00:00
}