[FEATURE] Adds resize and orientationchange event handling (slightly different implementation from resize feature in legacy branch)