         , 0
 
     @lastAngle = angle = @_normalizeAngle angle
-
-    if anchor is 'right' or anchor is 'bottom'
-      angle = -angle
-
-    if anchor is 'left' or anchor is 'right'
-      rotation = [0, 1, 0, angle]
-    else
-      rotation = [1, 0, 0, -angle]
+    rotation = @_getRotation anchor, angle
 
     @panels[anchor][1].style[css.transform] = @_transform @_getXy(1, anchor), rotation
 

          y = -@panelHeight + 1

    [x, y]


  _setShader: (i, anchor, deg) ->

    @lastAngle = angle = @_normalizeAngle angle
    angle /=  @_getPanelType anchor

    rotation = @_getRotation anchor, angle

    for panel, i in @panels[anchor]
      panel.style[css.transform] = @_transform @_getXy(i, anchor), rotation
