drawText(x, y, elementName, hydrogens, direction, isTerminal, charge, isotope, totalVertices, attachedPseudoElement = {}) {
    let text = [];
    let display = elementName;

    if (charge !== 0 && charge !== null) {
      display += SvgWrapper.createUnicodeCharge(charge);
    }

    if (isotope !== 0 && isotope !== null) {
      display = SvgWrapper.createUnicodeSuperscript(isotope) + display;
    }

    text.push([display, elementName]);

    if (hydrogens === 1) {
      text.push(['H', 'H']);
    } else if (hydrogens > 1) {
      text.push(['H' + SvgWrapper.createUnicodeSubscript(hydrogens), 'H']);
    } // TODO: Better handle exceptions
    // Exception for nitro (draw nitro as NO2 instead of N+O-O)


    if (charge === 1 && elementName === 'N' && attachedPseudoElement.hasOwnProperty('0O') && attachedPseudoElement.hasOwnProperty('0O-1')) {
      attachedPseudoElement = {
        '0O': {
          element: 'O',
          count: 2,
          hydrogenCount: 0,
          previousElement: 'C',
          charge: ''
        }
      };
      charge = 0;
    }

    for (let key in attachedPseudoElement) {
      if (!attachedPseudoElement.hasOwnProperty(key)) {
        continue;
      }

      let pe = attachedPseudoElement[key];
      let display = pe.element;

      if (pe.count > 1) {
        display += SvgWrapper.createUnicodeSubscript(pe.count);
      }

      if (pe.charge !== '') {
        display += SvgWrapper.createUnicodeCharge(charge);
      }

      text.push([display, pe.element]);

      if (pe.hydrogenCount === 1) {
        text.push(['H', 'H']);
      } else if (pe.hydrogenCount > 1) {
        text.push(['H' + SvgWrapper.createUnicodeSubscript(pe.hydrogenCount), 'H']);
      }
    }

    this.write(text, direction, x, y, totalVertices === 1);
  }
Draw a text to the canvas.

@param {Number} x The x position of the text.
@param {Number} y The y position of the text.
@param {String} elementName The name of the element (single-letter).
@param {Number} hydrogens The number of hydrogen atoms.
@param {String} direction The direction of the text in relation to the associated vertex.
@param {Boolean} isTerminal A boolean indicating whether or not the vertex is terminal.
@param {Number} charge The charge of the atom.
@param {Number} isotope The isotope number.
@param {Number} totalVertices The total number of vertices in the graph.
@param {Object} attachedPseudoElement A map with containing information for pseudo elements or concatinated elements. The key is comprised of the element symbol and the hydrogen count.
@param {String} attachedPseudoElement.element The element symbol.
@param {Number} attachedPseudoElement.count The number of occurences that match the key.
@param {Number} attachedPseudoElement.hyrogenCount The number of hydrogens attached to each atom matching the key.