Name

checkdragstate

Synopsis

LZX: checkdragstate
JavaScript: lz.checkdragstate
Type: Class
Access: public
Topic: Incubator.Components
Declared in: lps/components/incubator/draglib.lzx

Description

This should be declared as a child of the thing for which you want to enable dragging. You will need to define a view (an instance of a subclass of basedragimage) to define the visual look of the thing while its being dragged.
The object that you want to accept a drop action, needs to register with LzTrack using the same group as is declared in the dragimage.

Superclass Chain

node (LzNode) » state (LzState) » checkdragstate

Known Subclasses

Details

Properties (9)

draggername
<attribute name="draggername" type="string" value="dragimage" />
public var draggername : String;
an instance subclass of basedragimage that defines the visual representation of the item while it is being dragged
dragging
<attribute name="dragging" value="false" />
private var dragging;
firsttime
<attribute name="firsttime" value="true" />
private var firsttime;
startx
<attribute name="startx" value="$once{this.x}" />
private var startx;
starty
<attribute name="starty" value="$once{this.y}" />
private var starty;
xdoffset
<attribute name="xdoffset" value="this.getMouse( 'x' )" />
private var xdoffset;
xdrag
<attribute name="xdrag" value="${checkDragPos('x', this.immediateparent.getMouse( 'x' ))}" />
private var xdrag;
ydoffset
<attribute name="ydoffset" value="this.getMouse( 'y' )" />
private var ydoffset;
ydrag
<attribute name="ydrag" value="${checkDragPos('y', this.immediateparent.getMouse( 'y' ))}" />
private var ydrag;

Methods (1)

checkDragPos()
<method name="checkDragPos" args="xory, mousepos" />
private function checkDragPos(xory, mousepos);

LZX Synopsis

<class name="lz.checkdragstate" extends=" LzState ">
  <attribute name=" draggername " type="string" value="dragimage" />
  <attribute name=" dragging " value="false" />
  <attribute name=" firsttime " value="true" />
  <attribute name=" startx " value="$once{this.x}" />
  <attribute name=" starty " value="$once{this.y}" />
  <attribute name=" xdoffset " value="this.getMouse( 'x' )" />
  <attribute name=" xdrag " value="${checkDragPos('x', this.immediateparent.getMouse( 'x' ))}" />
  <attribute name=" ydoffset " value="this.getMouse( 'y' )" />
  <attribute name=" ydrag " value="${checkDragPos('y', this.immediateparent.getMouse( 'y' ))}" />
  <method name=" checkDragPos " args="xory, mousepos" />
</class>

JavaScript Synopsis

public lz.checkdragstate extends  LzState  {
  public var draggername  : String;
  private var dragging ;
  private var firsttime ;
  private var startx ;
  private var starty ;
  private var xdoffset ;
  private var xdrag ;
  private var ydoffset ;
  private var ydrag ;
  prototype private function checkDragPos (xory, mousepos);
}