Performing a HitTest to find shapes under a given shape


Author
Message
Jason Irby
Jason Irby
Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)
Group: Forum Members
Posts: 59, Visits: 77

 

I am wanting to find the first shape/group underneath a specified shape/group.

I am wanting to grab a shape/group and move it on the drawing onto another shape/group and then connect the two.

Appearently this is not considered drapdrop as the shapes we already on the drawing and the dragdrop event doesn't fire in this case.

The approach I have been taking is to catch the transformchanged event and that gives me the moving shape/group.  I was trying to use that to do a hit test in the document, but I have not figured out how to do that properly.

 

Is that my best approach?  Is there a better way? Can you point me to an example?  I have not been able find much information on that.  I had the most trouble with the HitTestContext.

 

Thanks in advance,

Jason


Reply
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

What I got from your description is that you want to move one shape over another and when the shape is dropped the 2 shapes to automatically connect but how ? Through a line connecting them or the 2 shapes should be directly connected using an outward port ? Please, explain in more details what are you trying to do.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search