txusko/PostItAll

Minimizing a note is choppy

Closed this issue · 4 comments

Expected
Smooth animation when minimizing a note.

Actual behavior
The animation feels a bit laggy as it jumps to the top edge, then to the bottom. After opening it again it jumps to the previous position very choppy.

Example
minify
noteTest.zip
(just click inside the read area and minimize the note)

Environment
Firefox 47.0a2

Yes, this is something I was trying to fix some months ago without success.
I can't remember where the problem was, but it was something relative to the jquery animate() function and the change of the "position" css attribute *.
I can remeber that when the animation was smooth with Firefox, it wasn't with Chrome, and viceversa.

I will try to improve the method, but I can't assure a solution.

  • You can check it in the restoreOldPosition method

I think instead of animation the position property it would be better to use transform as this triggers hardware acceleration which is very important on mobile devices.

Ok, I will investigate.

I hope it works fine now ...
49cb6c3