function nodeMass(nodeId) {
    var links = graph.getLinks(nodeId);
    if (!links) return 1;
    return 1 + links.length / 3.0;
  }
/**
   * Calculates mass of a body, which corresponds to node with given id.
   *
   * @param {String|Number} nodeId identifier of a node, for which body mass needs to be calculated
   * @returns {Number} recommended mass of the body;
   */
Calculates mass of a body, which corresponds to node with given id.
@param {String|Number} nodeId identifier of a node, for which body mass needs to be calculated
@returns {Number} recommended mass of the body.
Calculates mass of a body which corresponds to node with given id . @param { String|Number } nodeId identifier of a node for which body mass needs to be calculated @returns { Number } recommended mass of the body .
function nodeMass(nodeId) {
    var links = graph.getLinks(nodeId);
    if (!links) return 1;
    return 1 + links.length / 3.0;
  }
function nodeMass ( nodeId ) { var links = graph . getLinks ( nodeId ) ; if ( ! links ) return 1 ; return 1 + links . length / 3.0 ; }
Calculates mass of a body, which corresponds to node with given id.
Calculates mass of a body which corresponds to node with given id .