SuperDkc / jwopitz-lib

Automatically exported from code.google.com/p/jwopitz-lib
0 stars 0 forks source link

Item renderer widths and heights aren't bound to rowHeight and columnWidth in TileCanvas #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. setup a TileCanvas where rowHeight or columnWidth changes via data 
binding
2. add a tile and then change either rowHeight or columnWidth
3. add another tile

What is the expected output? What do you see instead?
I expect both added tiles to be the same size based on the latest rowHeight 
and columnWidth.  Instead, each itemrenderer item remains the size it was 
at when added to the TileCanvas.

What version of the product are you using? On what operating system?
The latest from SVN.  WinXP

Original issue reported on code.google.com by andrewwe...@gmail.com on 11 Dec 2008 at 7:35

GoogleCodeExporter commented 8 years ago

Original comment by jwopitz on 15 Dec 2008 at 2:57

GoogleCodeExporter commented 8 years ago
Thanks for accepting this issue.  For the time being, I've worked-around this 
issue 
by adding some lines to updateItemLocations().  Not the most elegant solution, 
but it 
seems to work for now.

if(item.height != rowHeight)
{
    item.height = rowHeight;
}
if(item.width != columnWidth - 20)
{
    item.width = columnWidth - 20;
}

The -20 isn't really necessary for your fix.  In my particular application, I 
use it 
so I don't get the tiles going underneath a vertical scrollbar.

Original comment by andrewwe...@gmail.com on 15 Dec 2008 at 3:10

GoogleCodeExporter commented 8 years ago
One thing to keep in mind is that the TileCanvas was really just a 
Proof-of-Concept
saying that at the time, I could do the same thing the Flex store did, but more
component-like.  It is probably way over due for an overhaul, in fact I know it 
is. 
Funny, this wasn't even supposed to be a component in the jwolib, just folks 
really
liked it.  Glad you are using it with some success.

Thanks for the code contribution.  When I get around to cleaning it up, I will 
see
what I can use of your solution to fix this issue.

Original comment by jwopitz on 15 Dec 2008 at 3:21