Added a callback to resize event, passes width and height.