jsfiddle/OpenLayers.debug.js
function(x, y){
            var oldX = this.x, oldY = this.y;
            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
            if(control._moving) {
                return;
            }
            var evt = control.dragControl.handlers.drag.evt;
            var constrain = (evt && evt.shiftKey) ? 45 : 1;
            var centerGeometry = control.center;
            var dx1 = this.x - centerGeometry.x;
            var dy1 = this.y - centerGeometry.y;
            var dx0 = dx1 - x;
            var dy0 = dy1 - y;
            this.x = oldX;
            this.y = oldY;
            var a0 = Math.atan2(dy0, dx0);
            var a1 = Math.atan2(dy1, dx1);
            var angle = a1 - a0;
            angle *= 180 / Math.PI;
            control._angle = (control._angle + angle) % 360;
            var diff = control.rotation % constrain;
            if(Math.abs(control._angle) >= constrain || diff !== 0) {
                angle = Math.round(control._angle / constrain) * constrain -
                    diff;
                control._angle = 0;
                control.box.geometry.rotate(angle, centerGeometry);
                control.transformFeature({rotation: angle});
            } 
        }
function(x, y){
            var oldX = this.x, oldY = this.y;
            OpenLayers.Geometry.Point.prototype.move.call(this, x, y);
            if(control._moving) {
                return;
            }
            var evt = control.dragControl.handlers.drag.evt;
            var constrain = (evt && evt.shiftKey) ? 45 : 1;
            var centerGeometry = control.center;
            var dx1 = this.x - centerGeometry.x;
            var dy1 = this.y - centerGeometry.y;
            var dx0 = dx1 - x;
            var dy0 = dy1 - y;
            this.x = oldX;
            this.y = oldY;
            var a0 = Math.atan2(dy0, dx0);
            var a1 = Math.atan2(dy1, dx1);
            var angle = a1 - a0;
            angle *= 180 / Math.PI;
            control._angle = (control._angle + angle) % 360;
            var diff = control.rotation % constrain;
            if(Math.abs(control._angle) >= constrain || diff !== 0) {
                angle = Math.round(control._angle / constrain) * constrain -
                    diff;
                control._angle = 0;
                control.box.geometry.rotate(angle, centerGeometry);
                control.transformFeature({rotation: angle});
            } 
        }
function ( x , y ) { var oldX = this . x , oldY = this . y ; OpenLayers . Geometry . Point . prototype . move . call ( this , x , y ) ; if ( control . _moving ) { return ; } var evt = control . dragControl . handlers . drag . evt ; var constrain = ( evt && evt . shiftKey ) ? 45 : 1 ; var centerGeometry = control . center ; var dx1 = this . x - centerGeometry . x ; var dy1 = this . y - centerGeometry . y ; var dx0 = dx1 - x ; var dy0 = dy1 - y ; this . x = oldX ; this . y = oldY ; var a0 = Math . atan2 ( dy0 , dx0 ) ; var a1 = Math . atan2 ( dy1 , dx1 ) ; var angle = a1 - a0 ; angle *= 180 / Math . PI ; control . _angle = ( control . _angle + angle ) % 360 ; var diff = control . rotation % constrain ; if ( Math . abs ( control . _angle ) >= constrain || diff !== 0 ) { angle = Math . round ( control . _angle / constrain ) * constrain - diff ; control . _angle = 0 ; control . box . geometry . rotate ( angle , centerGeometry ) ; control . transformFeature ( { rotation : angle } ) ; } }
Override for rotation handle move - make sure that the box and other handles are updated, and finally transform the feature.
Override for rotation handle move - make sure that the box and other handles are updated and finally transform the feature .