chenglou / react-tween-state

React animation.
Other
1.74k stars 70 forks source link

Add a 3rd example #11

Closed josephsavona closed 10 years ago

josephsavona commented 10 years ago

Based on the additive animation example in the referenced blog post - http://ronnqvi.st/multiple-animations/

Click anywhere in the 3rd box to animate the box toward the point clicked. 2d helps demonstrate the additive animation.

chenglou commented 10 years ago

Humm... Thanks but I think two examples should be fine? The gif on the article already demos additive animation. If we felt the need, we could just add that to the README instead. The second example's x axis already compares additive vs destructive. What do you think?

(Also, that handleTweenClick reaches into the DOM way too much. It shouldn't have to).

josephsavona commented 10 years ago

Up to you - I created the example by way of testing out the library, and agree that the examples you have are sufficient.

Is there a more React way of getting the click (x,y) offset relative to its parent?

chenglou commented 10 years ago

I guess you do have to reach into the DOM for these, so don't mind what I said.

Yeah, I'll close this for now. Thanks a lot though. Keep the feedback coming! =)