src/app/script.js
/**
 * Draws text above a vertex for the distance from a source.
 * @param {container} vert vertex container
 * @param {number} w weight from a source
 */
Draws text above a vertex for the distance from a source.
@param {container} vert vertex container
@param {number} w weight from a source
Draws text above a vertex for the distance from a source . @param { container } vert vertex container @param { number } w weight from a source
function drawWeight(vert, w) {
  const weight = new PIXI.Text(w, {
    fontWeight: 'bold',
    fontSize: 15,
    fontFamily: 'monospace',
    fill: '#ffffff',
  });
  weight.y = -40;
  weight.x = 10;
  vert.addChild(weight);
}
function drawWeight ( vert , w ) { const weight = new PIXI . Text ( w , { fontWeight : 'bold' , fontSize : 15 , fontFamily : 'monospace' , fill : '#ffffff' , } ) ; weight . y = - 40 ; weight . x = 10 ; vert . addChild ( weight ) ; }
Draws text above a vertex for the distance from a source.
Draws text above a vertex for the distance from a source .