NPellet / visualizer

Other
43 stars 24 forks source link

set / get annotations with jsGraph #931

Open lpatiny opened 8 years ago

lpatiny commented 8 years ago

jsGraph has a new way to get and set annotations ('advanced way') that should allow to directly access the annotations and change them from outside jsgraph

/**
   * Gets all dumpable properties of the shape
   * @return {Object} properties - The properties object
   * @memberof Shape
   */
  Shape.prototype.getProperties = function( properties ) {
    return this.properties;
  };

To set the annotations you should use the "shapeProperties". shapeData being the old simplified format.

GraphCore.newShape: function( shapeType, shapeData, mute, shapeProperties );