Print Friendly

Class Ext.dd.StatusProxy

Package:Ext.dd
Class:StatusProxy
Extends:Object
Defined In:StatusProxy.js
A specialized drag proxy that supports a drop status icon, Ext.Layer styles and auto-repair. This is the default drag proxy used by all Ext.dd components.

Properties   -  Methods   -  Events   -  Config Options

Public Properties

This class has no public properties.

Public Methods

Method Defined By
  StatusProxyObject config ) StatusProxy
  getEl() : Ext.Layer StatusProxy
Returns the underlying proxy Ext.Layer
  getGhost() : Ext.Element StatusProxy
Returns the ghost element
  hideBoolean clear ) : void StatusProxy
Hides the proxy
  repairArray xy, Function callback, Object scope ) : void StatusProxy
Causes the proxy to return to its position of origin via an animation. Should be called after an invalid drop operat...
  resetBoolean clearGhost ) : void StatusProxy
Resets the status indicator to the default dropNotAllowed value
  setStatusString cssClass ) : void StatusProxy
Updates the proxy's visual element to indicate the status of whether or not drop is allowed over the current target e...
  show() : void StatusProxy
Displays this proxy
  stop() : void StatusProxy
Stops the repair animation if it's currently running
  sync() : void StatusProxy
Force the Layer to sync its shadow and shim positions to the element
  updateString html ) : void StatusProxy
Updates the contents of the ghost element

Public Events

This class has no public events.

Config Options

Config Options Defined By
  dropAllowed : String StatusProxy
The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
  dropNotAllowed : String StatusProxy
The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").

Constructor Details

StatusProxy

public function StatusProxy( Object config )
Parameters:
  • config : Object

Method Details

getEl

public function getEl()
Returns the underlying proxy Ext.Layer
Parameters:
  • None.
Returns:
  • Ext.Layer
    el
This method is defined by StatusProxy.

getGhost

public function getGhost()
Returns the ghost element
Parameters:
  • None.
Returns:
  • Ext.Element
    el
This method is defined by StatusProxy.

hide

public function hide( Boolean clear )
Hides the proxy
Parameters:
  • clear : Boolean
    True to reset the status and clear the ghost contents, false to preserve them
Returns:
  • void
This method is defined by StatusProxy.

repair

public function repair( Array xy, Function callback, Object scope )
Causes the proxy to return to its position of origin via an animation. Should be called after an invalid drop operation by the item being dragged.
Parameters:
  • xy : Array
    The XY position of the element ([x, y])
  • callback : Function
    The function to call after the repair is complete
  • scope : Object
    The scope in which to execute the callback
Returns:
  • void
This method is defined by StatusProxy.

reset

public function reset( Boolean clearGhost )
Resets the status indicator to the default dropNotAllowed value
Parameters:
  • clearGhost : Boolean
    True to also remove all content from the ghost, false to preserve it
Returns:
  • void
This method is defined by StatusProxy.

setStatus

public function setStatus( String cssClass )
Updates the proxy's visual element to indicate the status of whether or not drop is allowed over the current target element.
Parameters:
  • cssClass : String
    The css class for the new drop status indicator image
Returns:
  • void
This method is defined by StatusProxy.

show

public function show()
Displays this proxy
Parameters:
  • None.
Returns:
  • void
This method is defined by StatusProxy.

stop

public function stop()
Stops the repair animation if it's currently running
Parameters:
  • None.
Returns:
  • void
This method is defined by StatusProxy.

sync

public function sync()
Force the Layer to sync its shadow and shim positions to the element
Parameters:
  • None.
Returns:
  • void
This method is defined by StatusProxy.

update

public function update( String html )
Updates the contents of the ghost element
Parameters:
  • html : String
    The html that will replace the current innerHTML of the ghost element
Returns:
  • void
This method is defined by StatusProxy.

Config Details

dropAllowed

dropAllowed : String
The CSS class to apply to the status element when drop is allowed (defaults to "x-dd-drop-ok").
This config option is defined by StatusProxy.

dropNotAllowed

dropNotAllowed : String
The CSS class to apply to the status element when drop is not allowed (defaults to "x-dd-drop-nodrop").
This config option is defined by StatusProxy.

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.