Class NodeGraph.DragPanMixin
| Defined in: | frameworks/nodegraph/mixins/dragpan.js |
| Version: | 1.0 |
| Author: | Peter Bergstrom |
| Copyright: | 2008-2009 Peter Bergström. |
Overview
This the drag pan mixin for the views. It will be used in multiple places to allow for drag panning.
Property Summary
-
- (Integer) _canDrag [R/W]Can the view drag-pan or not. -
- (Integer) _mouseDragTime [R/W]This is the mouseDragTime. -
- (Integer) _xPos [R/W]This is the xPos for the drag-pan. -
- (Integer) _yPos [R/W]This is the yPos for the drag-pan.
Method Summary
-
- (void) handleMouseDownDrag(evt)Handle a mouse down where there is no guid. -
- (void) mouseDragged(evt)Update the view if the view is being dragged. -
- (void) mouseUp(evt)End a drag pan operation if the view is being dragged.
Property Details
_canDrag [R/W]
Can the view drag-pan or not.
- Integer _canDrag
Default Value: NO
Discussion
NO if it can't.
_mouseDragTime [R/W]
This is the mouseDragTime.
- Integer _mouseDragTime
Discussion
Registered as things are dragged to determine the wait time.
Method Detail
handleMouseDownDrag()
Handle a mouse down where there is no guid.
- (void) handleMouseDownDrag (evt)
Parameters
(DOM Event)evt The mouseDown event.
Discussion
Enable a drag.
mouseDragged()
Update the view if the view is being dragged.
- (void) mouseDragged (evt)
Parameters
(DOM Event)evt The mouseDragged event.
Discussion
Don't do anything if 200 ms has not passed.
mouseUp()
End a drag pan operation if the view is being dragged.
- (void) mouseUp (evt)
Parameters
(DOM Event)evt The mouseUp event.