From a538aa0067c27eab282394e7e537402d3c66467e Mon Sep 17 00:00:00 2001 From: Joshua Gould Date: Tue, 10 May 2016 14:14:32 -0400 Subject: [PATCH] fixed size calc --- src/ui/grid.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ui/grid.js b/src/ui/grid.js index 112538a..dc672ce 100644 --- a/src/ui/grid.js +++ b/src/ui/grid.js @@ -326,7 +326,7 @@ morpheus.Grid.prototype = { var maxWidth = Math.min(parseInt(gridWidth / 2), 400); var getColumnWidth = function (column) { var w = $header.html(column.name).outerWidth(); - w = Math.max($cell.outerWidth(), w); + if (column.prototypeValue) { $cell.html(column.prototypeValue); w = Math.max($cell.outerWidth(), w); @@ -342,7 +342,7 @@ morpheus.Grid.prototype = { } } column.width = parseInt(Math.min(maxWidth, w)); - + }; var totalWidth = 0; for (var i = 0; i < columns.length; i++) { @@ -362,7 +362,6 @@ morpheus.Grid.prototype = { // shrink last column } - $d.remove(); this.grid.resizeCanvas(); } -- GitLab