Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Center handler hittest & TouchThreshold (Read 8606 times)
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Center handler hittest & TouchThreshold
Oct 23rd, 2017 at 4:45pm
Print Post  
Hi,

Can you tell me what the center handler is for? Usually I'm using handles.Move as base then add side and corner handles based on object type. Here's a problem, in 6.5 and later, there's a TouchThreshold property added for easy access of handlers on touch screen. If I set it to a big value like 8 or 10, the left sides handlers on left/right work great but hard for the top/bottom one because the hittest range for center handler will be enlarged too which affect the top/bottom range.

Can you look into that? Maybe we can disable the hittest range change of center point.

Thanks,

Kyle Chen
  

CenterPoint.png ( 7 KB | 121 Downloads )
CenterPoint.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #1 - Oct 23rd, 2017 at 7:10pm
Print Post  
Hi,

You can draw links from there usually if that's the EasyMove style. If you are disallowing links via some property or event handlers, I guess we could ignore the center handle when hit-testing for that style. Or try using the SquareHandles2 style - it gives you large area for moving the node too.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #2 - Oct 25th, 2017 at 7:49pm
Print Post  
Hi Slavcho,

No, I don't need any link on any object. So is there any way to ignore the center handle when hit-testing in v6.5.1? Or are you talking about next release? Grin

Thanks,

Kyle

Slavcho wrote on Oct 23rd, 2017 at 7:10pm:
Hi,

You can draw links from there usually if that's the EasyMove style. If you are disallowing links via some property or event handlers, I guess we could ignore the center handle when hit-testing for that style. Or try using the SquareHandles2 style - it gives you large area for moving the node too.

Regards,
Slavcho

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #3 - Oct 26th, 2017 at 6:09am
Print Post  
Hi Kyle,

At this time you could set HandlesStyle to Custom and subscribe to DrawAdjustmentHandles and HitTestAdjustmentHandles events. From the draw event call InternalUtils.DrawSelHandles method to get standard handle rendering, and from hit-test one set HitResult as you see fit.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #4 - Nov 13th, 2017 at 9:47pm
Print Post  
Hi Slavcho,

I'd rather wait until this is done by you guys. Already too many custom stuff in my code. Do you have plan to add code to hittest for case without any link allowed?

Thanks,

Kyle

Slavcho wrote on Oct 26th, 2017 at 6:09am:
Hi Kyle,

At this time you could set HandlesStyle to Custom and subscribe to DrawAdjustmentHandles and HitTestAdjustmentHandles events. From the draw event call InternalUtils.DrawSelHandles method to get standard handle rendering, and from hit-test one set HitResult as you see fit.

Regards,
Slavcho

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #5 - Nov 16th, 2017 at 10:39pm
Print Post  
Hi Kyle,

In what way are you preventing links, via Behavior property or some event handling?

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #6 - Nov 17th, 2017 at 5:15pm
Print Post  
Hi Slavcho,

In my application there's no links between nodes. I think you can hittest to side handlers first if there's no link in/out of a node. Does this make sense?

Kyle

Slavcho wrote on Nov 16th, 2017 at 10:39pm:
Hi Kyle,

In what way are you preventing links, via Behavior property or some event handling?

Regards,
Slavcho

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #7 - Nov 17th, 2017 at 5:19pm
Print Post  
Are you using a Behavior value that does not allow links at all?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #8 - Nov 20th, 2017 at 7:32pm
Print Post  
Check if this build works better for you -
https://mindfusion.eu/_beta/fcnet_handles.zip

It now selects the handle whose center point is closer to the touch point, rather than first one found to contain it.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #9 - Dec 8th, 2017 at 9:32pm
Print Post  
Hi Slavcho,

This works great. Thank you very much! Grin
When will be a formal release with this?

Kyle

Slavcho wrote on Nov 20th, 2017 at 7:32pm:
Check if this build works better for you -
https://mindfusion.eu/_beta/fcnet_handles.zip

It now selects the handle whose center point is closer to the touch point, rather than first one found to contain it.

Regards,
Slavcho

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


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #10 - Dec 11th, 2017 at 8:40am
Print Post  
Hi Kyle,

We should have a small release in January. Build from above has changes only in hit-testing code so it should be stable too.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #11 - Dec 11th, 2017 at 4:01pm
Print Post  
OK, cool. I'll use that version. Thanks for your help, Slavcho.

Slavcho wrote on Dec 11th, 2017 at 8:40am:
Hi Kyle,

We should have a small release in January. Build from above has changes only in hit-testing code so it should be stable too.

Regards,
Slavcho

  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #12 - Feb 1st, 2018 at 4:06pm
Print Post  
Hi Slavcho,

I'm using the test version you sent to me above(I unzipped it to a stand-alone folder and modify the references to point to them in my project). However recently when I try to open an existing form, it shows the existingError.png. I then copy the test version files to replace existing C:\Program Files (x86)\MindFusion\MindFusion.Diagramming for WinForms\CLR4 (.NET 4.0)\, it still the same issue.
Even I reverse the references to old regular version. It still shows the same error.

Then I create a new project and in the main form I add a diagramView, it shows the error as DiagramViewError.png.

What can cause this? and how to fix it?

Thanks,

Kyle
  

existingError.png ( 53 KB | 136 Downloads )
existingError.png
DiagramViewError.png ( 20 KB | 135 Downloads )
DiagramViewError.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Center handler hittest & TouchThreshold
Reply #13 - Feb 2nd, 2018 at 9:50am
Print Post  
Hi Kyle,

Could be Visual Studio trying to use different assemblies for the design.dll it loads for design-time support in form editor. Try running this tool to clear the VS assembly cache -

https://mindfusion.eu/_temp/cleanvs.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kyle Chen
Full Member
***
Offline


I Love MindFusion!

Posts: 104
Joined: Nov 29th, 2012
Re: Center handler hittest & TouchThreshold
Reply #14 - Feb 2nd, 2018 at 3:20pm
Print Post  
Hi Slavcho,

I run cleanvs.exe but it still gives the same error... Embarrassed

I then reset the references to the formal release of 6.5.1.401, it works immediately.
I guess the beta version you sent to me is not a complete set.
I checked, the following files are missing(especially the design file):
MindFusion.Licensing.dll
Design\MindFusion.Diagramming.WinForms.Controls.Design.dll
Design\MindFusion.Diagramming.WinForms.Design.dll

Another issue, did you change the PublicKeyToken to "dd7449df9ffcc455"?

Thanks,

Kyle
  

cleanvs.png ( 23 KB | 132 Downloads )
cleanvs.png
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint