Use the elements z-index as base for z-index calculations when resizing and dragging

When resizing and dragging, a fixed z-index was used and set (in case of resizing) on the event-element. If the z-index was altered by the developer, it was reset after resizing.
With this patch, the original z-index of the event-element is taken into account.