Dragging
Dragging tool performs distance tests for all applied points.
const drag = new Dragging
drag.initDragging(this)
drag.onDragMove = this.onDragMove.bind(this)
drag.onDragEnd = this.onDragEnd.bind(this)
Install points into the map:
drag.addPoints(this.center, this.point0, this.point1)
Upon a mouse action we can access the discovered points.
let p = drag.getPoint();
if(p) {
p.pen.circle(ctx)
}
Meta Data
| title | Dragging |
| dependencies | ('distances.js',) |
| unused_keys | () |
| unknown_keys | ('files',) |
| files | ['', 'protractor.js', 'text/beta.js'] |
| filepath_exists | True |
| path | dragging |
| filepath | dragging.js |
| clean_files | ('protractor.js', 'text/beta.js') |
-
ExpressionStatement
:
dict_keys(['type', 'expression', 'pos']) -
ClassDeclarationclass
Dragging
extends Distancesclass comments:click Down<>Up ms delta,-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])Given a function name shared by this instance, and the point, call the function with the event and arguments. callDoubleHandler('onClick', ev, point, ...) The function name must exist on this instance, optional on the point.
-
dict_keys(['kind', 'word', 'static', 'computed', 'is_symbol', 'value', 'type', 'comments', 'pos'])Call the method `name` on the point, with the event, _if_ the point contains the method. this.callPointHandler('onMousedown', ev, this._near) Apply any arguments after the _point_ to the event this.callPointHandler('onLongClick', ev, this._near, delta, { apples: 'green'})
ClassDeclarationclassCursorStack
extends Noneclass comments:stash and pop cursor states. id = cursor.set(name) cursor.unset(id)ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])EmptyStatement; (empty statement)ExpressionStatement:
dict_keys(['type', 'expression', 'pos'])