Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic LaneGrid CellBounds ChangedEvent incorrect values (Read 6392 times)
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
LaneGrid CellBounds ChangedEvent incorrect values
Jan 7th, 2010 at 1:53pm
Print Post  
Hi,

LaneGrid CellBounds changed event does not report the right values for oldBounds and newBounds of the cell after a header resize.

I have a simple grid of 3 columns x 2 rows and if I change the height of a column header I receive 6 cellChnaged events (which is fine) but oldBounds and newBounds all have the same X value!!

Note that my grid has hierarchical headers. I have a column header that has 3 sub headers.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #1 - Jan 7th, 2010 at 3:12pm
Print Post  
Hi,

This version should fix it:
https://mindfusion.eu/_beta/fcnet_lanes.zip

Stoyan
  
Back to top
 
IP Logged
 
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #2 - Jan 7th, 2010 at 4:34pm
Print Post  
It's better, but not quite right yet  Wink

On the same grid as in my initial post when I resize the row headers (making them wider) i now get the right X but the Y of oldbounds and newbounds is wrong and seems to increase by the height of teh previous cell at each new event call.

e.g I'm getting for the 6 events

Cell 11   old {X=98.58125,Y=34.0229,Width=61.75,Height=76.61249}  new {X=122.3938,Y=34.0229,Width=61.75,Height=76.61249}
Cell 21   old {X=98.58125,Y=110.6354,Width=61.75,Height=73.70207}  new {X=122.3938,Y=110.6354,Width=61.75,Height=73.70207}
Cell 12   old {X=160.3313,Y=184.3375,Width=120.2229,Height=76.61249}  new {X=184.1438,Y=184.3375,Width=120.2229,Height=76.61249}
Cell 22   old {X=160.3313,Y=260.95,Width=120.2229,Height=73.70207}  new {X=184.1438,Y=260.95,Width=120.2229,Height=73.70207}
Cell 13   old {X=280.5542,Y=334.652,Width=30,Height=76.61249}  new {X=304.3667,Y=334.652,Width=30,Height=76.61249}
Cell 23   old {X=280.5542,Y=411.2645,Width=30,Height=73.70207}  new {X=304.3667,Y=411.2645,Width=30,Height=73.70207}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #3 - Jan 8th, 2010 at 7:57am
Print Post  
Here's an even better version 8)
https://mindfusion.eu/_beta/fcnet_lanes2.zip

Stoyan
  
Back to top
 
IP Logged
 
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #4 - Jan 8th, 2010 at 8:48am
Print Post  
Yep Y works now, but X is broken.  It works if I resize the row headers width but if I resize a column the X value of the moved cells is now wrong.

Here's what I get when i resize the first column:

cells 11 and 21 are fine (only the width changes) but all the other ones have wrong X.

Cell 11   old {X=45.37062,Y=30.58334,Width=51.31727,Height=51.1831}  new {X=45.37062,Y=30.58334,Width=81.89134,Height=51.1831}
Cell 21   old {X=45.37062,Y=81.76643,Width=51.31727,Height=65.4706}  new {X=45.37062,Y=81.76643,Width=81.89134,Height=65.4706}
Cell 12   old {X=0.009262085,Y=147.237,Width=61.16846,Height=51.1831}  new {X=30.58334,Y=147.237,Width=61.16846,Height=51.1831}
Cell 22   old {X=0.009262085,Y=198.4201,Width=61.16846,Height=65.4706}  new {X=30.58334,Y=198.4201,Width=61.16846,Height=65.4706}
Cell 13   old {X=0.009262085,Y=263.8907,Width=54.02473,Height=51.1831}  new {X=30.58334,Y=263.8907,Width=54.02473,Height=51.1831}
Cell 23   old {X=0.009262085,Y=315.0739,Width=54.02473,Height=65.4706}  new {X=30.58334,Y=315.0739,Width=54.02473,Height=65.4706}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #5 - Jan 8th, 2010 at 12:03pm
Print Post  
Hopefully this will work both for X and Y:
https://mindfusion.eu/_beta/fcnet_lanes3.zip

Stoyan
  
Back to top
 
IP Logged
 
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #6 - Jan 9th, 2010 at 5:09pm
Print Post  
I just tested the new version. It seems to work very well now. Thanks for fixing it so quickly.  Smiley

On a completely unrelated topic, I'd like to serialize the grid independently of the whole diagram as I have a different mechanism in place for the persistence of the nodes and links. Right now I copy the grid to an empty flowchart that I serialize, but being able to serialize/restore the grid alone would be nice.  Could you make the method for it public?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #7 - Jan 10th, 2010 at 10:18am
Print Post  
We could make the grid's XML serialization method public if that will work for you.
  
Back to top
 
IP Logged
 
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Re: LaneGrid CellBounds ChangedEvent incorrect val
Reply #8 - Jan 11th, 2010 at 8:44am
Print Post  
Yes, that would be perfect I think and really do what i'm looking for.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint