- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.JavaScript pack. It includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are more details and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Problem when resize multiple nodes
Read 496 times

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Problem when resize multiple nodes
Jun 13th, 2019 at 2:12pm
 
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?
 
 
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #1 - Jun 13th, 2019 at 2:19pm
 
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.
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Problem when resize multiple nodes
Reply #2 - Jun 14th, 2019 at 9:32am
 
Hi Pablo,

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

Regards,
Slavcho
 
 
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #3 - Jun 15th, 2019 at 4:27pm
 
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.
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Problem when resize multiple nodes
Reply #4 - Jun 17th, 2019 at 10:16am
 
Please verify your project loads the assemblies with v3.5.5 build number, or attach a test project reproducing that otherwise.
 
 
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #5 - Jun 17th, 2019 at 1:43pm
 
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 2:51pm by PDM »
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #6 - Jun 17th, 2019 at 3:08pm
 
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.

 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1829
Gender: male
tech.support


   
     
 
Re: Problem when resize multiple nodes
Reply #7 - Jun 17th, 2019 at 3:18pm
 
My guess is this part always moves current selected node instead of deselecting -

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



Remove that or otherwise check if the node contains the point before setting HitResult.
 
 
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #8 - Jun 17th, 2019 at 3:34pm
 
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!!
 
 
 
IP Logged    
 
     

PDM   Offline
Senior Member
****
Posts: 255
I love YaBB 1G - SP1!


   
     
 
Re: Problem when resize multiple nodes
Reply #9 - Jun 17th, 2019 at 3:35pm
 
Again!! thanks for the faster fix of the bug when resize Smiley
Really appreciated!!
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print