layer.draggable.constraints

Constraints for the area this layer can be dragged within. If you also set the x and y properties as constraints, the layer will snap to that position on DragStart. The layer will animate to the new point on click.
译:约束该层可在拖动的区域。如果还设置了x和y属性作为约束条件,图层将捕捉到的dragstart那个位置。该层将要设置动画上点击新点。

layerA = new Layer
layerA.draggable.enabled = true

# Set dragging constraints 
layerA.draggable.constraints =
    x: 0
    y: 0
    width: 200
    height: 200

results matching ""

    No results matching ""