koenbok/Framer — pull request #60 by tisho (2014-05-11 07:07:01+00:00)
Title: Pass layer and state name into dynamic state properties

Also changes the context of the executed function to the layer.
This makes it possible to do things like:

```
# this adds a state called "a" for every layer that moves the layer 200px up from its current position
for layer in [layer1, layer2]
layer.states.add 'a', y: -> @y - 200
```

or, if not relying on `this`:

```
for layer in [layer1, layer2]
layer.states.add 'a', y: (l) -> l.y - 200
```