Framer.CurrentContext.reset()
을 호출하고 프로토 타입을 다시 작성하면됩니다.
쉽게 만들려면 모든 설정 코드를 컨텍스트 재설정 후 호출하는 함수 안에 작성하십시오. 초기 설정을 위해 setup()
기능을 호출하는 것을 잊지 마십시오.
예 :
setup = ->
# Everything should go inside the setup() function
layerA = new Layer
backgroundColor: 'green'
layerA.animate
properties:
x: Align.right
resetButton = new Layer
x: Align.center
y: Align.bottom
backgroundColor: 'red'
resetButton.onClick ->
Framer.CurrentContext.reset()
#Call setup() again to recreate all layers
setup()
# Initial setup call
setup()
여기
전체 프로토 타입 : http://share.framerjs.com/9fl1g7icvnax/