First call resizeMedia before changing width attr
Merge pull request #1372 from Squarific/master

Fix little jump by calling the resizeMedia method before changing the width attribute