Skip to content

Commit

Permalink
Fixed column left positions being set to zero after replacing all ite…
Browse files Browse the repository at this point in the history
…ms when columns had a fixed width provided.
  • Loading branch information
josdejong committed Aug 17, 2015
1 parent 8e2c509 commit d3ed8ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions js/src/treegrid/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ http://almende.github.com/chap-links-library/
not yet released, version 1.6.2

- Fixed dragging items being broken due to the fix of v1.6.1.
- Fixed column left positions being set to zero after replacing all items
when columns had a fixed width provided.


2015-07-27, version 1.6.1
Expand Down
7 changes: 6 additions & 1 deletion js/src/treegrid/treegrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,10 @@ links.TreeGrid.Grid.prototype.reflow = function() {
var left = indentationWidth + this.iconsWidth;
for (var i = 0, iMax = columns.length; i < iMax; i++) {
var column = columns[i];
column.left = left;
if (left != column.left) {
column.left = left;
resized = true;
}
left += column.width;
}

Expand Down Expand Up @@ -1343,6 +1346,8 @@ links.TreeGrid.Grid.prototype.reflow = function() {
this.onUpdateHeight(diffHeight);
}

console.log('Grid.reflow', resized)

return resized;
};

Expand Down

0 comments on commit d3ed8ff

Please sign in to comment.