ayer.draggable.directionLockThreshold

The thresholds for lock directions. The x and y values represent the distance you can drag in a certain direction before it starts locking.
译:锁定方向的阈值。在一个特定的方向上,你可以拖动到一个特定方向的距离,并且在开始锁定之前。

layerA = new Layer
layerA.draggable.enabled = true

# Snap horizontally after dragging 50px 
# Snap vertically instantly 
layerA.draggable.directionLock = true

layerA.draggable.directionLockThreshold =
    x: 50
    y: 0

results matching ""

    No results matching ""