code: function update(properties, callback){
      var body = {};
      if(properties.parent){
        if(typeof properties.parent !== 'string')
          return callback(new Error('parent id must be string'));
        body.parent = properties.parent;
      }
      if(properties.offset){
        if(isNaN(properties.offset.x)) return callback(new Error('offset.x must be a number'));
        if(isNaN(properties.offset.y)) return callback(new Error('offset.y must be a number'));
        body.offset = {
          x: properties.offset.x,
          y: properties.offset.y
        };
      }
      if(properties.text){
          if(typeof properties.text !== 'string')
              return callback(new Error('text must be string'));
          if(properties.text.length > 3000)
              return callback(new Error('text too long'));
          body.text = properties.text;
      }
      var self = this;
      this.diagram.apiclient.put(
        this.replaceIds('/api/1/diagrams/:diagram/nodes/:node'),
        '',
        body,
        function(err, node){
          if(err)
            return callback(err);
          self.parent_id = node.parent_id;
          self.text      = node.text;
          self.offset    = node.offset;
          return callback(false, self);
      });
    }
docs: !jsjsdoc
  
  doc.CoggleApiNode.update = {
  $brief: "Update the properties of this node",
  $parameters: {
  properties: {
  $type: "Object: {text:String, offset:{x:Number, y:Number}, parent:String}",
  $brief: "Omitted properties are unmodified."
  },
  callback: {
  $type: "Function",
  $brief: "Callback accepting (Error, CoggleApiNode)",
  }
  }
  }