Documentation

include MVC MVC.Animate MVC.Class MVC.Controller MVC.Controller.Action MVC.Controller.Action.Drag MVC.Controller.Action.Drop MVC.Controller.Action.EnterLeave MVC.Controller.Action.Event MVC.Controller.Action.Hover MVC.Controller.Action.Lasso MVC.Controller.Action.Selectable MVC.Controller.Action.Subscribe MVC.Controller.Comet MVC.Controller.Params MVC.Controller.Params.Drag MVC.Controller.Params.Drop MVC.Controller.Stateful MVC.Delegator MVC.Doc MVC.Element MVC.Event MVC.File MVC.History MVC.IO MVC.IO.Ajax MVC.IO.Comet MVC.IO.JsonP MVC.IO.WindowName MVC.IO.XDoc MVC.Model MVC.Model.Ajax MVC.Model.Cookie MVC.Model.JsonP MVC.Model.JsonRest MVC.Model.WindowName MVC.Model.XmlRest MVC.Native MVC.Native.Array MVC.Native.Date MVC.Native.Function MVC.Native.Number MVC.Native.Object MVC.Native.String MVC.Options MVC.Store MVC.SyntheticEvent MVC.Test MVC.Test.Assertions MVC.Test.Controller MVC.Test.Functional MVC.Test.Runner MVC.Test.Unit MVC.Timer MVC.Timer.Easings MVC.Vector MVC.View MVC.View.Helpers OpenAjax

MVC.Draggable

A draggable object, created on mouse down. This basically preps a possible drag. Start is called on the first mouse move after the mouse down. This is to prevent drag from being called on a normal click. This function should do as little as possible. Start should do more work because we are actually dragging at that point.

Constructor

MVC.Draggable

new MVC.Draggable(params) -> mvc.draggable

Takes a mousedown even params

{MVC.Controller.Params} - a mousedown event, the element it is on, and dragstart, dragend, and dragging

Static Methods

k

k() -> undefined

Prototype Methods

cleanup

cleanup() -> undefined
Cleans up drag element after drag drop.

currentDelta

currentDelta() -> Vector
Returns the position of the drag_element by taking its top and left.
{Vector} -

end

end(event) -> undefined
Called on drag up
{Event} - a mouseup event signalling drag/drop has completed

start

start(event) -> undefined
Called the first time we start dragging. This will call drag start with MVC.Controller.Params.Drag
{Object} -