boolean |
scroll
When set to true, the utility automatically tries to scroll the browser
window wehn a drag and drop element is dragged near the viewport boundary.
|
Class YAHOO.util.DD
Object | +--YAHOO.util.DragDrop | +--YAHOO.util.DD
- Direct Known Subclasses:
- YAHOO.util.DDProxy
class
YAHOO.util.DD
Field Summary [top]
Fields inherited from class YAHOO.util.DragDrop [top]
Constructor Summary [top]
YAHOO.util.DD
A DragDrop implementation where the linked element follows the
mouse cursor during a drag.
Method Summary [top]
void |
alignElWithMouse
(<HTMLElement> el, <int> iPageX, <int> iPageY)
Sets the element to the location of the mousedown or click event,
maintaining the cursor location relative to the location on the element
that was clicked.
|
void |
applyConfig
()
Applies the configuration parameters that were passed into the constructor.
|
void |
autoOffset
(<int> iPageX, <int> iPageY)
Sets the pointer offset to the distance between the linked element's top
left corner and the location the element was clicked
|
void |
b4Drag
(e)
Event that fires prior to the onDrag event.
|
void |
b4MouseDown
(e)
Event that fires prior to the onMouseDown event.
|
void |
cachePosition
(iPageX, iPageY)
Saves the most recent position so that we can reset the constraints and
tick marks on-demand.
|
void |
setDelta
(<int> iDeltaX, <int> iDeltaY)
Sets the pointer offset.
|
void |
setDragElPos
(<int> iPageX, <int> iPageY)
Sets the drag element to the location of the mousedown or click event,
maintaining the cursor location relative to the location on the element
that was clicked.
|
string |
toString
()
toString method
|
Methods inherited from class YAHOO.util.DragDrop
lock, unlock, startDrag, onDrag, onDragEnter, onDragOver, onDragOut, onDragDrop, endDrag, onMouseDown, onMouseUp, onAvailable, getEl, getDragEl, init, initTarget, setPadding, setInitPosition, addToGroup, removeFromGroup, setDragElId, setHandleElId, setOuterHandleElId, unreg, isLocked, addInvalidHandleType, addInvalidHandleId, addInvalidHandleClass, removeInvalidHandleType, removeInvalidHandleId, removeInvalidHandleClass, isValidHandleChild, setXConstraint, clearConstraints, clearTicks, setYConstraint, resetConstraints
Field Detail [top]
scroll
boolean
scroll
When set to true, the utility automatically tries to scroll the browser
window wehn a drag and drop element is dragged near the viewport boundary.
Defaults to true.
Constructor Detail [top]
YAHOO.util.DD
YAHOO.util.DD
()
A DragDrop implementation where the linked element follows the
mouse cursor during a drag.
- Parameters:
-
id
- the id of the linked element -
sGroup
- the group of related DragDrop items -
config
- an object containing configurable attributes Valid properties for DD: scroll
Method Detail [top]
alignElWithMouse
void
alignElWithMouse
(<HTMLElement> el, <int> iPageX, <int> iPageY)
Sets the element to the location of the mousedown or click event,
maintaining the cursor location relative to the location on the element
that was clicked. Override this if you want to place the element in a
location other than where the cursor is.
- Parameters:
-
el
- the element to move -
iPageX
- the X coordinate of the mousedown or drag event -
iPageY
- the Y coordinate of the mousedown or drag event
applyConfig
void
applyConfig
()
Applies the configuration parameters that were passed into the constructor.
This is supposed to happen at each level through the inheritance chain. So
a DDProxy implentation will execute apply config on DDProxy, DD, and
DragDrop in order to get all of the parameters that are available in
each object.
autoOffset
void
autoOffset
(<int> iPageX, <int> iPageY)
Sets the pointer offset to the distance between the linked element's top
left corner and the location the element was clicked
- Parameters:
-
iPageX
- the X coordinate of the click -
iPageY
- the Y coordinate of the click
b4Drag
void
b4Drag
(e)
Event that fires prior to the onDrag event. Overrides
YAHOO.util.DragDrop.
b4MouseDown
void
b4MouseDown
(e)
Event that fires prior to the onMouseDown event. Overrides
YAHOO.util.DragDrop.
cachePosition
void
cachePosition
(iPageX, iPageY)
Saves the most recent position so that we can reset the constraints and
tick marks on-demand. We need to know this so that we can calculate the
number of pixels the element is offset from its original position.
setDelta
void
setDelta
(<int> iDeltaX, <int> iDeltaY)
Sets the pointer offset. You can call this directly to force the offset to
be in a particular location (e.g., pass in 0,0 to set it to the center of the
object, as done in YAHOO.widget.Slider)
- Parameters:
-
iDeltaX
- the distance from the left -
iDeltaY
- the distance from the top
setDragElPos
void
setDragElPos
(<int> iPageX, <int> iPageY)
Sets the drag element to the location of the mousedown or click event,
maintaining the cursor location relative to the location on the element
that was clicked. Override this if you want to place the element in a
location other than where the cursor is.
- Parameters:
-
iPageX
- the X coordinate of the mousedown or drag event -
iPageY
- the Y coordinate of the mousedown or drag event
toString
string
toString
()
toString method
- Returns:
- string representation of the dd obj