PHP Класс 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}:
Устаревший: Use TJuiDraggable instead
Автор: Christophe BOULAIN ([email protected])
Наследование: extends Prado\Web\UI\WebControls\TPanel
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

addAttributesToRender() защищенный Метод

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

getClientClassName() защищенный Метод

This method overrides the parent implementation.
protected getClientClassName ( ) : string
Результат string the javascript class name

getConstraint() публичный Метод

Determine if the element should be constrainted in one direction or not
public getConstraint ( ) : CDraggableConstraint
Результат CDraggableConstraint

getGhosting() публичный Метод

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
Результат TDraggableGhostingOption to clone the element

getHandle() публичный Метод

Get the handle id or css class
public getHandle ( ) : string
Результат string

getPostBackOptions() защищенный Метод

Gets the post back options for this textbox.
protected getPostBackOptions ( ) : array
Результат array

getRevert() публичный Метод

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
Результат TDraggableRevertOption true to revert

onPreRender() публичный Метод

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

setConstraint() публичный Метод

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

setGhosting() публичный Метод

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() публичный Метод

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

setRevert() публичный Метод

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 )