fixed bug 1: spinner will not return if the same item clicked 2: draw rectangles from arbitary directions