- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.Scheduling library for HTML5 & JavaScript.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Pages: 1 2  Send Topic Print  
Center handler hittest & TouchThreshold
Read 741 times

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


   
     
 
Re: Center handler hittest & TouchThreshold
Reply #15 - Feb 5th, 2018 at 11:36am
 
I guess it might still be loading a design.dll from the main installation, it's pointed by a registry key added by the installer. So maybe check if you are overwriting the design.dll assemblies located under clr4/design folder. We'll try to release this with a small update in a few days anyway.

Regards,
Slavcho
 
 
 
IP Logged    
 
     

Kyle Chen   Offline
Junior Member
**
Posts: 96
I Love MindFusion!


   
     
 
Re: Center handler hittest & TouchThreshold
Reply #16 - Feb 6th, 2018 at 2:19pm
 
OK. Great. I can wait for that release. Thank you Slavcho!
 
 
 
IP Logged    
 
     

Kyle Chen   Offline
Junior Member
**
Posts: 96
I Love MindFusion!


   
     
 
Re: Center handler hittest & TouchThreshold
Reply #17 - May 22nd, 2018 at 3:16pm
 
Hello Slavcho,

Sorry I have to re-open this post again.

After running the beta version for a while, looks like we have to disable the center handles(to link nodes) otherwise it's hard to move the node, especially when the nodes is a small one. I set the TouchThreshold to 4.

Is there easy way to do this?

Thanks!

Kyle
 
 
 
IP Logged    
 
     

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


   
     
 
Re: Center handler hittest & TouchThreshold
Reply #18 - May 25th, 2018 at 10:59am
 
Hi Kyle,

Set HandlesStyle to Custom and handle Draw/HitTest events -

Code:
void OnDrawAdjustmentHandles(
	object sender, MindFusion.Diagramming.DrawItemEventArgs e)
{
	var node = (DiagramNode)e.Item;
	var style = node == diagram.ActiveItem ?
		diagram.ActiveItemHandlesStyle :
		diagram.SelectedItemHandlesStyle;

	InternalUtils.DrawSelHandles(
		e.Graphics,
		style,
		diagram.DisabledHandlesStyle,
		node.Bounds,
		node.RotationAngle,
		node.EnabledHandles,
		true,
		HandlesStyle.SquareHandles2,
		diagram.AdjustmentHandlesSize,
		new RenderOptions());
}

void OnHitTestAdjustmentHandles(object sender, HitTestEventArgs e)
{
	var node = (DiagramNode)e.Item;
	node.HandlesStyle = HandlesStyle.EasyMove;

	AdjustmentHandle handle = node.HitTestHandle(e.MousePosition);
	if (handle == null && node.ContainsPoint(e.MousePosition))
		handle = new NodeAdjustmentHandle(NodeHandleType.Move);
	e.HitResult = handle;
	node.HandlesStyle = HandlesStyle.Custom;
} 



Regards,
Slavcho
 
 
 
IP Logged    
 
     
Pages: 1 2  Send Topic Print