Fixed issues on viewport resize and rotate

Fixed typo in initialization of throttle function
Added watcher for viewport resize and rotate