AvatarHandler class abstract

The AvatarHandler is responsible for creating, position, and removing a drag avatar. A drag avatar provides visual feedback during the drag operation.

Implementers

Constructors

AvatarHandler()
Default constructor.
AvatarHandler.clone()
Creates an AvatarHelper that creates a clone of the draggable element as drag avatar. The avatar is removed at the end of the drag operation.
factory
AvatarHandler.original()
Creates an AvatarHelper that uses the draggable element itself as drag avatar.
factory

Properties

avatar Element?
Returns the avatar element during a drag operation.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
marginLeft num?
Returns the (cached) left margin of avatar.
no setter
marginTop num?
Returns the (cached) top margin of avatar.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cacheMargins() → void
Caches the marginLeft and marginTop of avatar.
drag(Point<num> startPosition, Point<num> position) → void
Moves the drag avatar to the new position.
dragEnd(Point<num> startPosition, Point<num> position) → void
Called when the drag operation ends.
dragStart(Element draggable, Point<num> startPosition) → void
Called when the drag operation starts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeTranslate() → void
Removes the CSS transform of avatar. Also stops the requested animation from setTranslate.
setLeftTop(Point<num> position) → void
Sets the CSS left/top values of avatar. Takes care of any left/top margins the avatar might have to correctly position the element.
setTranslate(Point<num> position) → void
Sets the CSS transform translate of avatar. Uses requestAnimationFrame to speed up animation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited