Skip to content

Commit 3e1ef33

Browse files
author
Anton Bystrov
committed
Removed global PhaserComps v1.1.0
1 parent b56ede1 commit 3e1ef33

File tree

8 files changed

+13
-12
lines changed

8 files changed

+13
-12
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phaser-ui-comps",
3-
"version": "1.0.14",
3+
"version": "1.1.0",
44
"description": "Phaser 3 UI Components Framework and JSFL builder for Adobe Animate",
55
"main": "src/phasercomps.js",
66
"scripts": {

src/components/UIButton.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import UIComponentPrototype from "./UIComponentPrototype";
22
import UIManager from "../manager/UIManager";
3+
import Phaser from "phaser";
34

45
const HIT_ZONE = "HIT_ZONE";
56
const LABEL = "label";

src/components/UIButtonDraggable.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import UIButton from "./UIButton";
22
import UIManager from "../manager/UIManager";
3-
43
const _EVENT_DRAG = "event_drag";
54

65
/**

src/components/UIComponentPrototype.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import "phaser";
2-
import UIManager from "../manager/UIManager";
1+
import Phaser from "phaser";
2+
import PhaserComps from "../phasercomps";
33

44
const _EVENT_STATE = "event_state";
55

@@ -25,6 +25,10 @@ export default class UIComponentPrototype extends Phaser.Events.EventEmitter {
2525

2626
static get EVENT_STATE() { return _EVENT_STATE; }
2727

28+
/**
29+
* @param {PhaserComps.UIComponents.UIComponentPrototype} parent
30+
* @param {String} key
31+
*/
2832
constructor(parent, key) {
2933
super();
3034

src/components/UIContainer.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import UIComponentPrototype from "./UIComponentPrototype";
2-
import 'phaser';
32

43
/**
54
* @memberOf PhaserComps.UIComponents

src/components/UIList.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ export default class UIList extends UIComponentPrototype {
9494
* @protected
9595
* @inheritDoc
9696
*/
97-
destroy() {
97+
destroy(fromScene) {
9898
this.clean();
99-
super.destroy();
99+
super.destroy(fromScene);
100100
}
101101

102102
onItemChange(item) {

src/phasercomps.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import UIComponents from "./components/UIComponents";
77
import Plugin from "./plugin/Plugin";
88
import UIManager from "./manager/UIManager";
99

10-
var PhaserComps = {
10+
const PhaserComps = {
1111
ComponentClip: ComponentClip,
1212
UIComponents: UIComponents,
1313
Plugin: Plugin,
1414
UIManager: UIManager
1515
};
1616

17-
export default PhaserComps;
18-
19-
global.PhaserComps = PhaserComps;
17+
export default PhaserComps;

src/plugin/Plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import "phaser";
1+
import Phaser from "phaser";
22
import ComponentClip from "../clip/ComponentClip";
33

44
/**

0 commit comments

Comments
 (0)