Added new diagram element transformation function rotateToNeighborSlope