Make resize work as expected from all edges and corners