Fixing issue #550

Changed the update function to check for the originalEvent.type
rather than the event.type to be more compatible with other libraries
that could rewrite the default resize event.