layer.draggable.directionLock < boolean>
Snap to horizontal/vertical direction after a certain threshold.
译:在一定阈值后,向水平/垂直方向对齐。
layerA = new Layer
layerA.draggable.enabled = true
# Allow dragging only in one direction at a time
layerA.draggable.directionLock = true