April 2024 - This site, and Kamaelia are being updated. There is significant work needed, and PRs are welcome.


Drag handler for Topology Viewer

A subclass of Kamaelia.UI.MH.DragHandler that implements "click and hold" dragging of particles for the TopologyViewer.

Example Usage

See source for TopologyViewer.

How does it work?

This is an implementation of Kamaelia.UI.MH.DragHandler. See that for more details.

The detect() method uses the withinRadius method of the physics attribute of the 'app' to determine which (if any) particle the mouse is hovering over when the drag is started. If there is no particle, then the drag does not begin.

At the start of the drag, the particle is 'frozen' to prevent motion due to the physics model of the topology viewer. This is achieved by calling the freeze() and unfreeze() methods of the particle. The particle is also 'selected'.

During the drag the particle's coordinates are updated and the physics model is notified of the change.


Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT