|
@@ -24,9 +24,8 @@ import History from "./History/History";
|
|
|
import { keyService } from "./Service/KeyService";
|
|
|
import mitt from "mitt";
|
|
|
|
|
|
-export default class Layer extends mitt {
|
|
|
+export default class Layer {
|
|
|
constructor(canvas) {
|
|
|
- super();
|
|
|
this.canvas = canvas;
|
|
|
this.load = new Load(this);
|
|
|
|
|
@@ -37,7 +36,12 @@ export default class Layer extends mitt {
|
|
|
this.display = false;
|
|
|
this.mousePosition = null;
|
|
|
|
|
|
- this.start();
|
|
|
+ setTimeout(() => {
|
|
|
+ console.log(this);
|
|
|
+ this.start();
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.setPrototypeOf(Object.getPrototypeOf(this), mitt());
|
|
|
}
|
|
|
|
|
|
start() {
|