hs.Expander.prototype.onDrag
Fires repeatedly during move and resize.
boolean hs.Expander.prototype.onDrag ( hs.Expander sender, object e )
The type of drag action can be determined from e.type, as explained below. Returning false cancels the move or resize action.
Details
Requires |
events, dragging |
Type |
event |
Returns |
boolean |
Parameters
- sender
- The sender object in this context is the hs.Expander instance.
- e
- If e.type is "move" or "image", this is a moving action. Else e.type is "resize". The position of the popup can be determined by using other e properties as shown below. e.dY and e.dX are the pixel values the mouse has been moved after the drag action started.
Example
Output the event arguments
Put this in the head section of your page:
<script type="text/javascript">
hs.Expander.prototype.onDrag = function (sender, e) {
var line = "";
for (var x in e) line += x +": "+ e[x] +", ";
document.getElementById("preview").innerHTML += "{ "+ line +" }\n";
}
</script>
Open the popup and move or resize it to inspect the drag arguments:
Click to open
See also