Fixed rect box repositioning after the user click the legend item. (Closes #1)