code: function() {
          if(this.feature.state != OpenLayers.State.INSERT &&
             this.feature.state != OpenLayers.State.DELETE) {
              this.feature.state = OpenLayers.State.UPDATE;
              if (this.modified && this._originalGeometry) {
                  var feature = this.feature;
                  feature.modified = OpenLayers.Util.extend(feature.modified, {
                      geometry: this._originalGeometry
                  });
                  delete this._originalGeometry;
              }
          }
      }
docs: Method: setFeatureState
  Called when the feature is modified.  If the current state is not
  INSERT or DELETE, the state is set to UPDATE.