From 7766e475d19fc7cbb7c1167dc248593e4cb18aaf Mon Sep 17 00:00:00 2001 From: Kleber Silva Date: Wed, 15 Sep 2021 21:27:21 -0300 Subject: [PATCH] code cleanup --- TODO.todo | 10 +++++----- src/core/action-handler.ts | 10 ---------- src/editor.window.ts | 4 ---- src/plugin.ts | 1 - 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/TODO.todo b/TODO.todo index 6359500..1938814 100644 --- a/TODO.todo +++ b/TODO.todo @@ -55,14 +55,14 @@ BASIC: [x] actions handler [x] undo [x] toggle gizmos - [ ] toggle enabled + [x] toggle enabled [x] reference image [x] toggle ref image [x] set alpha - [ ] global shortcuts - [ ] toggle gizmos - [ ] navigation (arrows) - [ ] undo + [x] global shortcuts + [x] toggle gizmos + [x] navigation (arrows) + [x] undo [ ] find another shortcut to toggle gizmos Refactors: diff --git a/src/core/action-handler.ts b/src/core/action-handler.ts index 03bcc81..e5ea3a0 100644 --- a/src/core/action-handler.ts +++ b/src/core/action-handler.ts @@ -21,17 +21,7 @@ export class ActionHandler { public getAction(id: string) { return id in this.actionById ? this.actionById[id] : null; } public addContainer(id: string, container: HTMLElement) { - // if (this._container) return; - // const container = document.querySelector(containerId) as HTMLElement; - // if (!container) { - // console.warn(`Could not find container with id ${containerId}`); - // return; - // } - // this._container = container; - // container.tabIndex = 0; this.containers[id] = container; - // container.onkeydown = this.onKeyDown.bind(this); - // container.onkeyup = this.onKeyUp.bind(this); } public enable() { diff --git a/src/editor.window.ts b/src/editor.window.ts index 6d2797b..371146b 100644 --- a/src/editor.window.ts +++ b/src/editor.window.ts @@ -10,7 +10,6 @@ import { ReferenceImage } from 'scene-view/reference-image'; import { SceneView } from 'scene-view/scene-view'; export class EditorWindow { - // private plugin: Phaser.Plugin; private _initialized = false; private disabledUI: DisabledUI; @@ -39,9 +38,6 @@ export class EditorWindow { private init() { this._initialized = true; - // const plugin = this.plugin; - // const game = plugin.game; - // root = root ?? game.world; Editor.init(); this.setupInspectorData(); diff --git a/src/plugin.ts b/src/plugin.ts index 386dc7a..c237a78 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,4 +1,3 @@ -import { DisabledUI } from 'disabled/disabled-ui'; import { EditorWindow } from 'editor.window'; import { Editor } from 'index'; import Phaser from 'phaser-ce';