Skip to content

Commit

Permalink
removed references to old reference image panel
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-swf committed Dec 9, 2021
1 parent 3e5c5a4 commit bc1c7d3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
11 changes: 5 additions & 6 deletions src/editor.state-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import { Editor } from 'core/editor';
import { DisabledUI } from 'disabled/disabled-ui';
import { EditorView } from 'editor-view/editor-view';
import { PluginConfig, PluginConfigBuilder } from 'plugin.model';
import { ReferenceImageController } from 'reference-image/reference-image.controller';

export class EditorStateHandler {
private _initialized = false;
private _isEnabled = false;
private disabledUI: DisabledUI;

private editorView: EditorView;
private referenceImageController: ReferenceImageController;
// private referenceImageController: ReferenceImageController;

private readonly game: Phaser.Game;
private configBuilder: PluginConfigBuilder;
Expand All @@ -34,7 +33,7 @@ export class EditorStateHandler {
Editor.init(config);

this.editorView = document.createElement(EditorView.tagName) as EditorView;
this.referenceImageController = new ReferenceImageController(this.game, config);
// this.referenceImageController = new ReferenceImageController(this.game, config);

this.editorView.init(this.game);

Expand All @@ -52,7 +51,7 @@ export class EditorStateHandler {
);

this.editorView.setupActions(actions);
this.referenceImageController.setupActions(actions);
// this.referenceImageController.setupActions(actions);

actions.addContainer('body', document.body);
}
Expand All @@ -65,7 +64,7 @@ export class EditorStateHandler {
if (!this._initialized) this.init(this.config);

this.editorView.enable(this.config);
this.referenceImageController.enable(this.config.refImage);
// this.referenceImageController.enable(this.config.refImage);

Editor.enable();
if (this.onshow) this.onshow();
Expand All @@ -85,7 +84,7 @@ export class EditorStateHandler {
this._isEnabled = false;
Editor.disable();
this.editorView.disable();
this.referenceImageController.disable();
// this.referenceImageController.disable();

this.disabledUI.enable();
if (this.onhide) this.onhide();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { ActionHandler } from 'core/action-handler';
import { ActionsToolbar } from 'editor-view/actions/actions-toolbar';
import { ReferenceImagePanel } from 'editor-view/actions/reference-image/reference-image-panel';
import { OldReferenceImagePanel } from 'old-ref-image/reference-image/reference-image-panel';
import { PluginConfig } from 'plugin.model';
import { ReferenceImage } from 'scene-view/reference-image';

export class ReferenceImageController {
export class OldReferenceImageController {
private readonly referenceImage: ReferenceImage;
private readonly panel: ReferenceImagePanel;
private readonly panel: OldReferenceImagePanel;
private actionsToolbar: ActionsToolbar;

private image: PIXI.Sprite;

constructor(game: Phaser.Game, config: PluginConfig) {
this.referenceImage = new ReferenceImage(game, config.root);
this.panel = document.createElement(ReferenceImagePanel.tagName) as ReferenceImagePanel;
this.panel = document.createElement(OldReferenceImagePanel.tagName) as OldReferenceImagePanel;
this.panel.init(this.referenceImage);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
phred-reference-image-panel {
phred-old-reference-image-panel {
display: flex;
align-items: stretch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Actions } from 'core/actions';
import { Editor } from 'core/editor';
import { PreferenceKey } from 'core/preferences';
import { ReferenceImage } from 'scene-view/reference-image';
import { ActionButton } from '../button/action-button';
import { ActionButton } from '../../editor-view/actions/button/action-button';
import './reference-image-panel.scss';

export class ReferenceImagePanel extends HTMLElement {
public static readonly tagName = 'phred-reference-image-panel';
export class OldReferenceImagePanel extends HTMLElement {
public static readonly tagName = 'phred-old-reference-image-panel';

private button: ActionButton;
private slider: HTMLInputElement;
Expand Down Expand Up @@ -40,4 +40,4 @@ export class ReferenceImagePanel extends HTMLElement {
}
}

customElements.define(ReferenceImagePanel.tagName, ReferenceImagePanel);
customElements.define(OldReferenceImagePanel.tagName, OldReferenceImagePanel);
5 changes: 5 additions & 0 deletions src/reference-image/reference-image.panel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export class ReferenceImagePanel extends HTMLElement {
public static readonly tagName = 'phred-reference-image-panel';
}

customElements.define(ReferenceImagePanel.tagName, ReferenceImagePanel);

0 comments on commit bc1c7d3

Please sign in to comment.