diff --git a/engine/core/IgeUiEntity.js b/engine/core/IgeUiEntity.js index c63f73a42..8cb0f6c2f 100644 --- a/engine/core/IgeUiEntity.js +++ b/engine/core/IgeUiEntity.js @@ -295,7 +295,9 @@ var IgeUiEntity = IgeEntity.extend([ if (this._parent) { // Now we're mounted update our ui calculations since we have a parent // to calculate from - this._updateUiPosition(); + if (this._updateUiPosition) { + this._updateUiPosition(); + } // Also update any children if we have any if(this._children.length) { @@ -342,7 +344,12 @@ var IgeUiEntity = IgeEntity.extend([ * @private */ _resizeEvent: function (event) { - this._updateUiPosition(); + + if (this._updateUiPosition) { + this._updateUiPosition(); + } else { + debugger; + } IgeEntity.prototype._resizeEvent.call(this, event); } }); diff --git a/engine/extensions/IgeUiPositionExtension.js b/engine/extensions/IgeUiPositionExtension.js index 8ecdae999..888ffb2dd 100644 --- a/engine/extensions/IgeUiPositionExtension.js +++ b/engine/extensions/IgeUiPositionExtension.js @@ -524,8 +524,10 @@ var IgeUiPositionExtension = { while (arrCount--) { arrItem = arr[arrCount]; + if (arrItem._updateUiPosition) { + arrItem._updateUiPosition(); + } - arrItem._updateUiPosition(); if (typeof(arrItem.updateUiChildren) === 'function') { arrItem.updateUiChildren(); }