Basic: Layer .frame

layerA = new Layer
borderRadius: 20
backgroundColor: “SKYBLUE”
layerA.originalFrame = layerA.frame
layerA.draggable.enabled = yes
layerA.onDragMove ->
mdist = layerA.x — layerA.originalFrame.x
layerA.shadowX = mdist/20
layerA.shadowBlur = Math.abs mdist/20
layerA.shadowColor = “black”
Like what you read? Give Ian Lee a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.