We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae8706a commit 7e64b4dCopy full SHA for 7e64b4d
1 file changed
src/gameobjects/container/Container.js
@@ -115,6 +115,16 @@ var Container = new Class({
115
*/
116
this.removeCallback = this.removeHandler;
117
118
+ /**
119
+ * A reference to the Scene Display List.
120
+ *
121
+ * @name Phaser.GameObjects.Container#_displayList
122
+ * @type {Phaser.GameObjects.DisplayList}
123
+ * @private
124
+ * @since 3.4.0
125
+ */
126
+ this._displayList = scene.sys.displayList;
127
+
128
this.setPosition(x, y);
129
130
if (Array.isArray(children))
@@ -135,6 +145,8 @@ var Container = new Class({
135
145
136
146
addHandler: function (list, gameObject)
137
147
{
148
+ this._displayList.remove(gameObject);
149
138
150
gameObject.on('destroy', this.remove, this);
139
151
140
152
if (gameObject.parentContainer)
0 commit comments