Started clicking action

master
Beau Blyth 2019-09-26 15:05:37 -07:00
parent 07baa6d8bd
commit d196386d3c
2 changed files with 15 additions and 0 deletions

View File

@ -4,5 +4,19 @@ export class CanvasHandler {
constructor(currentImageDiv: HTMLElement) { constructor(currentImageDiv: HTMLElement) {
this.currentImageDiv = currentImageDiv; this.currentImageDiv = currentImageDiv;
this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage);
this.currentImageDiv.addEventListener('onmouseover', this.hoverOverImage);
} }
// public Load() {
// this.currentImageDiv.addEventListener('onmousedown', this.clickOnImage);
// }
private hoverOverImage() {
console.log('hovering over image');
}
private clickOnImage = (e: Event) => {
console.log('Clicked on image');
};
} }

View File

@ -34,6 +34,7 @@ export class Page {
}; };
this.canvasHandler = new CanvasHandler(document.getElementById('currentImage') as HTMLElement); this.canvasHandler = new CanvasHandler(document.getElementById('currentImage') as HTMLElement);
// this.canvasHandler.currentImageDiv.addEventListener('onmousedown', ClickOnCanvas);
this.frameHandler = new FrameHandler( this.frameHandler = new FrameHandler(
document.getElementById('currentImage') as HTMLElement, document.getElementById('currentImage') as HTMLElement,