code: function(px) {
          var deltaX = this.handlers.drag.last.x - px.x;
          var deltaY = this.handlers.drag.last.y - px.y;
          if(deltaX != 0 || deltaY != 0) {
              var rectTop = this.rectPxBounds.top;
              var rectLeft = this.rectPxBounds.left;
              var rectHeight = Math.abs(this.rectPxBounds.getHeight());
              var rectWidth = this.rectPxBounds.getWidth();
              // don't allow dragging off of parent element
              var newTop = Math.max(0, (rectTop - deltaY));
              newTop = Math.min(newTop,
                                this.ovmap.size.h - this.hComp - rectHeight);
              var newLeft = Math.max(0, (rectLeft - deltaX));
              newLeft = Math.min(newLeft,
                                 this.ovmap.size.w - this.wComp - rectWidth);
              this.setRectPxBounds(new OpenLayers.Bounds(newLeft,
                                                         newTop + rectHeight,
                                                         newLeft + rectWidth,
                                                         newTop));
          }
      }
docs: Method: rectDrag
  Handle extent rectangle drag
  
  Parameters:
  px - {<OpenLayers.Pixel>} The pixel location of the drag.