import Fridge from "Modules/Fridge" export default class Events { static setAll(fridge: Fridge) { this.setBAdd(fridge) // this.docMouMov(fridge); // this.docMouLea(fridge); } static setBAdd(fridge: Fridge) { const bAdd = document.getElementById("document-add") as HTMLButtonElement bAdd.onclick = () => fridge.createChit(); } // static docMouMov(fridge: Fridge) { // let ox = 100, oy = 100; // document.onmousemove = e => { // if ((e.target as HTMLElement).localName === "div") { // e.preventDefault(); // fridge.moveChit({ top: oy - e.y, left: ox - e.x }); // [ox, oy] = [e.x, e.y] // } // } // } // static docMouLea(fridge: Fridge) { // document.onmouseleave = () => { // fridge.stopChitMove() // } // } }