Class: MMap.Draggable
The drug function is built into a specific object.
The object built in should mount the toElement method and the setPosition method.
Method: constructor
Constructor of MMap.Draggable.
Syntax:
var MyClass = new Class({
Extends: [MMap.OverlayView],
Implements: [MMap.Draggable]
});
Options:
- onDragStart - (function) When the drug of the object is begun, it is generated.
- onDragEnd - (function) When the drug of the object is ended, it is generated.
- onDrag - (function) This event is generated while the object is being dragged.
Method: setDraggable
Effective/invalidity of the drug function is switched.
Syntax:
var object = object.setDraggable(true);
Arguments:
- value - (boolean) When a possible drug is targeted, true is specified.
Returns:
(object) draggable object
Method: isDraggable
Whether the object is a possible drug is examined.
Syntax:
var draggable = object.isDraggable();
Returns:
(boolean) True is returned for a possible drug.
Method: isDragging
The state of the drug of the object is returned.
Syntax:
var dragging = object.isDragging();
Returns:
(boolean) Inside true drug is returned.