drag


Module hilo/util/drag Requires hilo/core/Hilo Source drag.js
drag A mixin that contains drag method.You can mix drag method to the visual target by use Class.mix(target, drag) or Hilo.util.copy(target, drag).


example:

var bmp = new Bitmap({image:img});
Hilo.util.copy(bmp, Hilo.drag);
bmp.startDrag([0, 0, 550, 400]);

Properties

Property Defined
static 是否需要 transform,父元素有 transform 时需要设置为true
drag

Methods

Method Defined
startDrag(bounds:Array)
static start drag.
drag
static stop drag.
drag

Property Detail

[Static] dragNeedTransform
是否需要 transform,父元素有 transform 时需要设置为true
Default: false

Method Detail

[Static] startDrag(bounds:Array)
start drag.
parameters
bounds:Array — The bounds area that the view can move, relative to the coordinates of the view's parent, [x, y, width, height], default is no limit.
[Static] stopDrag()
stop drag.