layer.frame < object>

Allows you to set or capture the x, y, width and height values of a layer.
译:允许您设置或捕捉一个图层的宽度和高度值。

layerA = new Layer

print layerA.frame
# Output: { x: 100, y: 100, width: 100, height: 100 } 

layerA.frame =
    x: 10
    y: 200
    width: 10
    height: 10

print layerA.frame
# Output: { x: 10, y: 200, width: 10, height: 10 } 

print layerA.x
# Output: 10

results matching ""

    No results matching ""