Detecting clicks on spatial links using Link Clicked

From Planimate Knowledge Base
Jump to: navigation, search

If you want the Spatial Links in a Panel to respond to mouse clicks, first set the Panel Option "Send Spatial Link Clicks".

This suppresses the normal link information menu.

Thereafter, whenever the modeller or user clicks on a spatial link line a system broadcast called "_Link Clicked" gets sent.



The broadcast includes the following tuple attributes:

_x,_y
The panel screen co-ordinate at which the mouse was clicked.
_ratio
The ratio along the spatial link line where the user clicked, from near 0 (start of) approaching 1 (end of link)
_from
Object label identifier of the "from" portal for the link.
_to
Object label identifier of the "to" portal for the link.
_buttons
Indicates which button was clicked,
Left = 1
Right = 2