PHP Class Prado\Web\UI\ActiveControls\TDraggable

Warning: this class is deprecatd and will be removed in a future release. We suggest you to investigate using {@link TJuiDraggable} instead. This control will make "draggable" control. Properties : {@link setGhosting Ghosting} : If set to "Ghosting" or "True", the dragged element will be cloned, and the clone will be dragged. If set to "SuperGhosting", the element will be cloned, and attached to body, so it can be dragged outside of its parent. If set to "None" of "False" (default), the element itself is dragged {@link setRevert Revert}: Set to True if you want your dragged element to revert to its initial position if not dropped on a valid area. {@link setConstraint Constraint}: Set this to Horizontal or Vertical if you want to constraint your move in one direction. {@link setHandle Handle}:
Deprecation: Use TJuiDraggable instead
Author: Christophe BOULAIN ([email protected])
Inheritance: extends Prado\Web\UI\WebControls\TPanel
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
getConstraint ( ) : CDraggableConstraint Determine if the element should be constrainted in one direction or not
getGhosting ( ) : TDraggableGhostingOption Determine if the element should be cloned when dragged If true, Clones the element and drags the clone, leaving the original in place until the clone is dropped.
getHandle ( ) : string Get the handle id or css class
getRevert ( ) : TDraggableRevertOption Determine if draggable element should revert to it orginal position upon release in an non-droppable container.
onPreRender ( $param ) Registers clientscripts
setConstraint ( $value ) Set wether the element should be constrainted in one direction
setGhosting ( $value ) Sets wether the element should be cloned when dragged If true, Clones the element and drags the clone, leaving the original in place until the clone is dropped.
setHandle ( $value ) Set the handle id or css class
setRevert ( $value ) Sets whether the draggable element should revert to it orginal position upon release in an non-droppable container.

Protected Methods

Method Description
addAttributesToRender ( $writer ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
getClientClassName ( ) : string Gets the name of the javascript class responsible for performing postback for this control.
getPostBackOptions ( ) : array Gets the post back options for this textbox.

Method Details

addAttributesToRender() protected method

Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
protected addAttributesToRender ( $writer )

getClientClassName() protected method

This method overrides the parent implementation.
protected getClientClassName ( ) : string
return string the javascript class name

getConstraint() public method

Determine if the element should be constrainted in one direction or not
public getConstraint ( ) : CDraggableConstraint
return CDraggableConstraint

getGhosting() public method

Defaults to false Since 3.2, Ghosting can be set to one of the value of {@link TDraggableGhostingOptions} enumeration. o "True" or "Ghosting" means standard pre-3.2 ghosting mechanism o "SuperGhosting" use the Superghosting patch by Christopher Williams, which allow elements to be dragged from an scrollable list o "False" or "None" means no Ghosting options
public getGhosting ( ) : TDraggableGhostingOption
return TDraggableGhostingOption to clone the element

getHandle() public method

Get the handle id or css class
public getHandle ( ) : string
return string

getPostBackOptions() protected method

Gets the post back options for this textbox.
protected getPostBackOptions ( ) : array
return array

getRevert() public method

Since 3.2, Revert property can be set to one of the value of {@link TDraggableRevertOption} enumeration. o 'True' or 'Revert' : The draggable will revert to it's original position o 'False' or 'None' : The draggable won't revert to it's original position o 'Failure' : The draggable will only revert if it's dropped on a non droppable area
public getRevert ( ) : TDraggableRevertOption
return TDraggableRevertOption true to revert

onPreRender() public method

This method overrides the parent implementation and is invoked before render.
public onPreRender ( $param )

setConstraint() public method

Set wether the element should be constrainted in one direction
public setConstraint ( $value )

setGhosting() public method

Defaults to false Since 3.2, Ghosting can be set to one of the value of {@link TDraggableGhostingOptions} enumeration. o "True" or "Ghosting" means standard pre-3.2 ghosting mechanism o "SuperGhosting" use the Superghosting patch by Christopher Williams, which allow elements to be dragged from an scrollable list o "False" or "None" means no Ghosting options
public setGhosting ( $value )

setHandle() public method

Set the handle id or css class
public setHandle ( $value )

setRevert() public method

Since 3.2, Revert property can be set to one of the value of {@link TDraggableRevertOption} enumeration. o 'True' or 'Revert' : The draggable will revert to it's original position o 'False' or 'None' : The draggable won't revert to it's original position o 'Failure' : The draggable will only revert if it's dropped on a non droppable area
public setRevert ( $value )