This function will update the sizes.

'animate' is a temporary parameter to fire the actual update of the canvas. Currently I am firing the filter again, but probably should not do this and just the re-draw - if there is anything like this.