Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MoveShades issue (Read 4666 times)
priyanka
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Sep 2nd, 2009
MoveShades issue
Jan 6th, 2010 at 11:51am
Print Post  
Hi,

I had set the ModificationEffect property to MoveShades.

Now when I am trying to move the node's shadow till last within the bounds of its parent node(when the node is moved fastly towards bootom), I am not able to move the shadow of the node till end.

But when the shadow is move slowly it easily moves till last.

Also need to make the node titled Input and Output to be always of the size as they are in 100% mode.(same as the orange handle, it remains at 100% irrespective of the zooming done.)


How could we achieve this.

Please provide some inputs on the above issue.

A sample regarding both the issues is send to support subjected "MoveShades issue"

Thanks,
Priyanka
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MoveShades issue
Reply #1 - Jan 6th, 2010 at 3:00pm
Print Post  
Hi,

1. The only thing you could do is to handle NodeModified and align the dragged node to its container node, e.g.:

if (mousePosition.Y > container.Bounds.Bottom - child.Bounds.Height)
     child.Bounds.Y = container.Bounds.Bottom - child.Bounds.Height;

2. You will have to multiply their original bounds and font size by 100 / ZoomFactor each time ZoomFactor is changed.

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


I love YaBB 1G - SP1!

Posts: 56
Joined: Sep 2nd, 2009
Re: MoveShades issue
Reply #2 - Jan 7th, 2010 at 8:27am
Print Post  
Hi,

Can u please elaborate on what does container and child referes to in the reply given for 1.

Thanks,
Priyanka
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MoveShades issue
Reply #3 - Jan 7th, 2010 at 8:37am
Print Post  
Hi,

Child is e.Node in the NodeModified handler, and container is its parent node.

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


I love YaBB 1G - SP1!

Posts: 56
Joined: Sep 2nd, 2009
Re: MoveShades issue
Reply #4 - Jan 7th, 2010 at 9:06am
Print Post  
Hi,

Thanks for quick response.!!

But that is not the issue..Sad

Issue is:
When we move the try to move the node's shadow in its container from top to bottom in a fast speed, then sometimes the shadow stucks towards the boundreies,even if there is space available ther to move in that direction.

We need to move the shadow in opposite direction then only we are able to move it.

This is the case when we move in the container from TOP to BOTTOM in a fast speed.
but if the speed is slow we are easily able to move towards top or end.

Please provide some inputs.

Thanks,
Priyanka
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MoveShades issue
Reply #5 - Jan 7th, 2010 at 11:31am
Print Post  
Yes, I understand that, but you will still have to align the moved node to the top or bottom of the container yourself. You might try doing that in response to NodeModifying instead of NodeModified if you wish the nodes to align while still dragging.

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


I love YaBB 1G - SP1!

Posts: 56
Joined: Sep 2nd, 2009
Re: MoveShades issue
Reply #6 - Jan 18th, 2010 at 2:21pm
Print Post  
Hi,

We tried to apply the solution you provided to multiply their original bounds and font size by 100 / ZoomFactor each time ZoomFactor is changed.

The lenght and width of the lable are 30 and 150 respectievely and the code which we are using is:

[code]
multiplyFactor = 100 / diagram.ZoomFactor;

double bottomMiddleNode = nodeInput.Bounds.Width / 2;
               double bottomMiddleBase = input.Bounds.Width / 2;

               double nodeX = bottomMiddleBase - bottomMiddleNode;
               nodeInput.Bounds = new Rect(nodeX, (input.Bounds.Y - nodeInput.Bounds.Width),
                   150 * multiplyFactor, 30 * multiplyFactor);
[/code]

but this is not making the lable node to be on top of the base node.
The lable node is placed somewhere far from the base node.

Please provide some inputs so that how could we place the lable node with respect to the base node such that the lable node is always only above the respective base node.

Thanks,
« Last Edit: Jan 19th, 2010 at 11:38am by priyanka »  
Back to top
 
IP Logged
 
priyanka
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 56
Joined: Sep 2nd, 2009
Re: MoveShades issue
Reply #7 - Feb 1st, 2010 at 9:06am
Print Post  
Hi,

Any update on this issue..!!??
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MoveShades issue
Reply #8 - Feb 1st, 2010 at 12:26pm
Print Post  
Are the width and height of nodeInput equal? Subtracting Width from Bounds.Y doesn't look correct.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MoveShades issue
Reply #9 - Feb 1st, 2010 at 12:36pm
Print Post  
Assuming you need to resize only the height of the label node and its font size, try this:

Code
Select All
Rect r = baseNode.Bounds;
labelNode.Bounds = new Rect(
	r.X, r.Y - originalHeight * 100 / diagram.ZoomFactor,
	r.Width, originalHeight * 100 / diagram.ZoomFactor);
labelNode.Font.Size *= 100 / diagram.ZoomFactor;
labelNode.Repaint(false);
 

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