Make animations robuste to parent size change
(and remove dead code)