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
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

getClientClassName() protected méthode

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

getConstraint() public méthode

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

getGhosting() public méthode

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
Résultat TDraggableGhostingOption to clone the element

getHandle() public méthode

Get the handle id or css class
public getHandle ( ) : string
Résultat string

getPostBackOptions() protected méthode

Gets the post back options for this textbox.
protected getPostBackOptions ( ) : array
Résultat array

getRevert() public méthode

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
Résultat TDraggableRevertOption true to revert

onPreRender() public méthode

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

setConstraint() public méthode

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

setGhosting() public méthode

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 méthode

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

setRevert() public méthode

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 )