drawNote = function drawNote(text, g) {
  g.attr('class', 'state-note');
  var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding);
  var rectElem = g.append('g');

  var _drawLongText2 = _drawLongText(text, 0, 0, rectElem),
      textWidth = _drawLongText2.textWidth,
      textHeight = _drawLongText2.textHeight;

  note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin);
  note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin * 2);
  return note;
}
Starting point for drawing a state. The function finds out the specifics
about the state and renders with approprtiate function.
@param {*} elem
@param {*} stateDef