Skip to content

Commit

Permalink
Merge pull request #238 from vansimke/18844
Browse files Browse the repository at this point in the history
change 'isArray' to 'isArrayLike' in dojox/grid/_Layout::setStructure
  • Loading branch information
vansimke authored Aug 12, 2016
2 parents 082aa52 + 74dad0b commit 31a68da
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions grid/_Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ return declare("dojox.grid._Layout", null, {
}
}
}

//Fix #9481 - reset idx in cell markup
array.forEach(this.cells, function(c){
var marks = c.markup[2].split(" ");
Expand All @@ -84,7 +84,7 @@ return declare("dojox.grid._Layout", null, {
c.markup[2] = marks.join(" ");
}
});

this.grid.setupHeaderMenu();
//this.grid.renderOnIdle();
},
Expand All @@ -103,7 +103,7 @@ return declare("dojox.grid._Layout", null, {
return false;
}
},

addCellDef: function(inRowIndex, inCellIndex, inDef){
var self = this;
var getCellWidth = function(inDef){
Expand Down Expand Up @@ -142,7 +142,7 @@ return declare("dojox.grid._Layout", null, {
props.unitWidth = getCellWidth(inDef);
return new cell_type(lang.mixin({}, this._defaultCellProps, inDef, props));
},

addRowDef: function(inRowIndex, inDef){
var result = [];
var relSum = 0, pctSum = 0, doRel = true;
Expand Down Expand Up @@ -174,7 +174,7 @@ return declare("dojox.grid._Layout", null, {
});
}
return result;

},

addRowsDef: function(inDef){
Expand All @@ -190,15 +190,15 @@ return declare("dojox.grid._Layout", null, {
}
return result;
},

addViewDef: function(inDef){
this._defaultCellProps = inDef.defaultCell || {};
if(inDef.width && inDef.width == "auto"){
delete inDef.width;
}
return lang.mixin({}, inDef, {cells: this.addRowsDef(inDef.rows || inDef.cells)});
},

setStructure: function(inStructure){
this.fieldIndex = 0;
this.cells = [];
Expand Down Expand Up @@ -244,7 +244,7 @@ return declare("dojox.grid._Layout", null, {
("cells" in def || "rows" in def || ("type" in def && !isCell(def))));
};

if(lang.isArray(inStructure)){
if(lang.isArrayLike(inStructure)){
var hasViews = false;
for(var i=0, st; (st=inStructure[i]); i++){
if(isView(st)){
Expand Down

0 comments on commit 31a68da

Please sign in to comment.