Commit a538aa00 authored by Joshua Gould's avatar Joshua Gould

fixed size calc

parent bb9e39e4
...@@ -326,7 +326,7 @@ morpheus.Grid.prototype = { ...@@ -326,7 +326,7 @@ morpheus.Grid.prototype = {
var maxWidth = Math.min(parseInt(gridWidth / 2), 400); var maxWidth = Math.min(parseInt(gridWidth / 2), 400);
var getColumnWidth = function (column) { var getColumnWidth = function (column) {
var w = $header.html(column.name).outerWidth(); var w = $header.html(column.name).outerWidth();
w = Math.max($cell.outerWidth(), w);
if (column.prototypeValue) { if (column.prototypeValue) {
$cell.html(column.prototypeValue); $cell.html(column.prototypeValue);
w = Math.max($cell.outerWidth(), w); w = Math.max($cell.outerWidth(), w);
...@@ -342,7 +342,7 @@ morpheus.Grid.prototype = { ...@@ -342,7 +342,7 @@ morpheus.Grid.prototype = {
} }
} }
column.width = parseInt(Math.min(maxWidth, w)); column.width = parseInt(Math.min(maxWidth, w));
}; };
var totalWidth = 0; var totalWidth = 0;
for (var i = 0; i < columns.length; i++) { for (var i = 0; i < columns.length; i++) {
...@@ -362,7 +362,6 @@ morpheus.Grid.prototype = { ...@@ -362,7 +362,6 @@ morpheus.Grid.prototype = {
// shrink last column // shrink last column
} }
$d.remove(); $d.remove();
this.grid.resizeCanvas(); this.grid.resizeCanvas();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment