Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem when resize multiple nodes (Read 3600 times)
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Problem when resize multiple nodes
Jun 13th, 2019 at 1:12pm
Print Post  
Hello, I create multiple nodes on my diagram example, just 2 custom nodes booth same size, then drag the mouse over the screen to select multiple nodes, when I resize the nodes dragging one of the handles, is supposed all nodes should end with same size.

I see after resize, some nodes end with different sizes, some are more big other a little but more big etc.
Some idea why this happen?
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #1 - Jun 13th, 2019 at 1:19pm
Print Post  
Extra info, only happen if have enabled the ruler, the lane grid.

form.AutoAlignNodes = true;
form.AlignToGrid = false;

I think is some kind of bug.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Problem when resize multiple nodes
Reply #2 - Jun 14th, 2019 at 8:32am
Print Post  
Hi Pablo,

This build should fix it -
https://mindfusion.eu/_temp/wpfdiag355.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #3 - Jun 15th, 2019 at 3:27pm
Print Post  
Thanks for the update, but no, no is fixed.
Now I check when resize multiple nodes  with ruler enabled, height is always ok after end of resize noded, but width of nodes always end with some pixels of difference.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Problem when resize multiple nodes
Reply #4 - Jun 17th, 2019 at 9:16am
Print Post  
Please verify your project loads the assemblies with v3.5.5 build number, or attach a test project reproducing that otherwise.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #5 - Jun 17th, 2019 at 12:43pm
Print Post  
ok, you are right ......incorrect version.
Now load correct assemblies, but have some errors.


private void form_HitTestAdjustmentHandles(object sender, HitTestEventArgs e)
{

var node = (DiagramNode)e.Item;
node.HandlesStyle = HandlesStyle.EasyMove;

int handle = -1;
node.HitTestHandle(e.MousePosition, ref handle); //**
if (handle == -1 && node.ContainsPoint(e.MousePosition))
handle = 8;
e.HitResult = handle; //*
node.HandlesStyle = HandlesStyle.Custom;
if (node.EnabledHandles == AdjustmentHandles.None)
{
node.HandlesStyle = HandlesStyle.SquareHandles2;
node.EnabledHandles = AdjustmentHandles.None;

}

}


//**      No overload for method 'HitTestHandle' takes 2 arguments      Modular

//* Cannot implicitly convert type 'int'

« Last Edit: Jun 17th, 2019 at 1:51pm by PDM. »  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #6 - Jun 17th, 2019 at 2:08pm
Print Post  
var node = (DiagramNode)e.Item;
    node.HandlesStyle = HandlesStyle.EasyMove;
    e.HitResult = node.HitTestHandle(e.MousePosition);
    if (e.HitResult == null)
        e.HitResult = NodeAdjustmentHandle.Move;
    node.HandlesStyle = HandlesStyle.Custom;


You already replied ot me with a solution in other post  thanks.
Anyway, somehting is working wrong after this update.

I select a node, or multiple nodes, can resize, all is ok.
But when make click outside of the node, on the form screen, the node continue selected and the handle is there, have to make multiple clicks for make the object is unselected.

Before this udpoate a simple click or drag outisde of node delected the node.
I use thsi feature duet you cna drag outside and over nodes for select multiple nodes.


No idea what happen but now is broken and have to click multiple times outside of node in order handle dissapear.  I think is a new bug.

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Problem when resize multiple nodes
Reply #7 - Jun 17th, 2019 at 2:18pm
Print Post  
My guess is this part always moves current selected node instead of deselecting -

Code
Select All
if (e.HitResult == null)
    e.HitResult = NodeAdjustmentHandle.Move; 



Remove that or otherwise check if the node contains the point before setting HitResult.
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #8 - Jun 17th, 2019 at 2:34pm
Print Post  
Lol!!
as 99.99% of time............you are right lol

   if (e.HitResult == null)
                if (node.ContainsPoint(e.MousePosition) == true)
                e.HitResult = NodeAdjustmentHandle.Move;
                node.HandlesStyle = HandlesStyle.Custom;

Done fixed!!
  
Back to top
 
IP Logged
 
PDM.
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 256
Joined: Dec 2nd, 2010
Re: Problem when resize multiple nodes
Reply #9 - Jun 17th, 2019 at 2:35pm
Print Post  
Again!! thanks for the faster fix of the bug when resize Smiley
Really appreciated!!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint