code: function() {
          var deactivated = OpenLayers.Control.prototype.deactivate.call(this);
          if(deactivated) {
              if(this.layer && this.layer.events) {
                  this.layer.events.un({
                      sketchstarted: this.onSketchModified,
                      sketchmodified: this.onSketchModified,
                      vertexmodified: this.onVertexModified,
                      scope: this
                  });
              }
          }
          this.feature = null;
          this.point = null;
          return deactivated;
      }
docs: APIMethod: deactivate
  Deactivate the control.  Deactivating the control unregisters listeners
  so feature editing may proceed without engaging the snapping agent.