Letractively / jxlib

Automatically exported from code.google.com/p/jxlib
0 stars 0 forks source link

Jx.Grid.Plugin.Resize performance issues #173

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. open the grid example
2. enable the column resize option
3. resize a column

What is the expected output? What do you see instead?

The column should resize smoothly.  It does not resize smoothly.

Is the problem specific to one web browser platform/version?

no.

Please use labels and text to provide additional information.

The underlying issue is around accommodating automatic row height in cells 
where we allow text 
to wrap.  We use programmatically generated style sheets to apply row heights 
and column 
widths, it seems like this is a rational approach that lets us touch a lot less 
elements.  However to 
get a reasonable measure of a row height when we allow text to wrap, we have to 
destroy the 
existing row height styles then measure then create new rules - this causes a 
lot of overhead.  If 
we don't do this until the end of the column resize, column resizing is very 
smooth but the row 
header heights can get all messed up compared to the cell heights.

A reasonable compromise might be to disable the auto row height thing when 
resizing columns.  
I'm not sure how we let that happen right now but if we could fix the cell 
heights while resizing, 
even if the text in a cell gets clipped by overflow it would be a good 
compromise.

Original issue reported on code.google.com by pagameba on 30 Apr 2010 at 12:31

GoogleCodeExporter commented 8 years ago

Original comment by pagameba on 30 Apr 2010 at 12:42

GoogleCodeExporter commented 8 years ago
Ok, I have come up with what I hope will be a reasonable compromise, I've 
modified the CSS selector used in 
row.js to also set the height of the content of the cells in the row and 
modified the resize plugin to only 
recompute row heights when the resize is complete.  What this does is limit the 
cell height of rows to the current 
height, which keeps the row headers lined up with the cells during a resize of 
a column that contains text that 
wraps.  The text overflows but is clipped by overflow hidden, so you lose some 
text during resize (if you make it 
smaller) but when you complete the resize, it fixes the row height to 
accommodate the content of the row.

Fixed in r887

Original comment by pagameba on 30 Apr 2010 at 12:47