kuyucuburak / light-it-up

1 stars 0 forks source link

Add animation to the wires #13

Closed kuyucuburak closed 2 years ago

kuyucuburak commented 2 years ago

Position of wires are changed suddenly, we should just move them with animation.

For example, let's say tile size is (100, 100) and its position is (400, 400). When the user drag it from left to right. We set its position as (500, 400) instantly.

To add an animation, we can set its position as (410, 400) (420, 400) (430, 400) ... (480, 400) (490, 400) (500, 400) in one second, or in 0.75 seconds etc.

While animating other tiles should be non-draggable.

TODO

HasimD commented 2 years ago

"During animation, make other tiles non-draggable. Probably just need to touch the base_draggable class with a boolean variable."

I think we do not need to do that. Now it works and looks nicer too. Please give me feedback on this. @kuyucuburak

kuyucuburak commented 2 years ago

You are absoluately right! It works and looks nicer now!