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.Controller.Action.Selectable

Selectable and Lasso let users select elements by dragging a box across an element. To use the lasso, you must have a lasso action on the element you want to drag in, and selectable elements.

You can use one of the following event names to:
EventDescription
selectadd Called when a selectable is added to the list of selectables.
selectmove Called when the lasso mouse moves over the selectable
selectover Called when the lasso moves onto a selectable
selectout Called when the lasso moves out of a selectable
selected Calls when the selectable is released on selected elements


For more information on how Selectables work read MVC.Selectable and MVC.Selectables

Example

TasksController = MVC.Controller.extend('tasks',{
    '# lassostart' : function(){}, //allows lassing in element w/ id = tasks
    selectadd : function(params){
      params.cache_position();
    },
    selectover : function(params){
      params.element.style.backgroundColor = "red"
    },
    selectout : function(params){
      params.element.style.backgroundColor = ""
    },
    selected : function(params){
      params.element.style.backgroundColor = "green"
    }
})

Install

include.plugins('controller/lasso')


Static Methods

match

matches "(.*?)\\s?(selectover|selected|selectout|selectadd|selectmove)$"

Prototype Methods

init

init(action_name, callback, className, element, action, f, controller) -> undefined
{} -
{} -
{} -
{} -
{Object} -
{Object} -
{Object} -