src/draw.js
/**
  * Creates an id string which is HTML-safe and encodes a single level object
  *
  * @param object the object to encode
  * @return string encoded object
  */
Creates an id string which is HTML-safe and encodes a single level object
@param object the object to encode
@return string encoded object
Creates an id string which is HTML - safe and encodes a single level object @param object the object to encode @return string encoded object
formatID(o) {
    let fields = ['g', 'n', 'd', 'i', 'a']; 
    let string = '';
    fields.forEach((f, i) => {
      if (f in o) string += `${i?'_':''}${f}-${o[f]}`;
    });
    return string;
  }
formatID ( o ) { let fields = [ 'g' , 'n' , 'd' , 'i' , 'a' ] ; let string = '' ; fields . forEach ( ( f , i ) => { if ( f in o ) string += ` ${ i ? '_' : '' } ${ f } ${ o [ f ] } ` ; } ) ; return string ; }
Creates an id string which is HTML-safe and encodes a single level object
 @param object the object to encode
 @return string encoded object
Creates an id string which is HTML - safe and encodes a single level object @param object the object to encode @return string encoded object
// graphID, plugin name, draw index, plugin index, alt point index // TODO add utf8ToHex-ed userdata?