Rotate a line when mouse is clicked on a stimuli

Sorry to disturb you again @dvbridges, but as I tried the amended code, a new error popped up:

TypeError: Cannot read property ‘map’ of undefined