Last active
January 28, 2016 10:24
-
-
Save antonkartashov/6b9fa4a884ae91271f39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layers = [] | |
for i in [0..5] | |
lay = new Layer | |
width: 750, height: 300 | |
y: 20 + i * 320 | |
backgroundColor: Utils.randomColor() | |
lay.on "click", -> | |
for j in [0..5] | |
id = parseInt @id - 1 | |
if j > id then layers[j].animate | |
properties: | |
y: 200 + j * 320 + 20 | |
time: .3 | |
this.animate | |
properties: | |
height: this.height + 200 | |
time: .3 | |
layers.push lay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment