fixed canvas resize animation

using @lmartinho's fix for animation