Login Register

GFX Mover vs Moveable

Can anyone elaborate on the difference between dojox.gfx.Mover and dojox.gfx.Moveable? I am confused because they both look like they do the same thing and I’m not sure which one I should be using. Suppose for example that I wanted to perform some custom action when the user started to drag a shape. Both classes have onFirstMove methods with the in-code documentation of Moveable clearly implying custom implementations. However all the examples I find on the web show sub-classing Mover instead of the more obvious Moveable. What is the difference between these two classes and which one should I derive from to implement custom handling of events?

Cheers.

These objects are mentioned

These objects are mentioned in the dojox.gfx documentation (http://docs.google.com/Doc?id=d764479_9hgdng4g8), and they mimic their counterparts from dojo.dnd (http://docs.google.com/Doc?id=d764479_11fcs7s397). I plan to expand the documentation at some point.

Basically as the end user you should use Moveable. Mover is created by Moveable dynamically, when the drag is detected. Mover is documented mostly because it is possible to replace it (it is a parameter of Moveable).