Skip to content

Commit

Permalink
Fix minor bug in UI code
Browse files Browse the repository at this point in the history
  • Loading branch information
Irrelon committed Dec 7, 2013
1 parent a449e7a commit 5fdc0c5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 9 additions & 2 deletions engine/core/IgeUiEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
});
Expand Down
4 changes: 3 additions & 1 deletion engine/extensions/IgeUiPositionExtension.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 5fdc0c5

Please sign in to comment.