rewrote PiecePaletteView to support the autorotation feature