Implement mouse dragging to rotate element