src/element.js
/**
  * Render an svg
  *
  * @param object SVG element
  * @return none
  */
Render an svg
@param object SVG element
@return none
Render an svg @param object SVG element @return none
render(svg) { 
    svg.setAttribute('viewBox', this.viewBox.join(' '))
    console.log(svg);
    if (Hive.Renderer[this.cfg.renderer.name]) {
      let pubsubMsgs = this.renderer.render(svg, this.events);
      if (this.cfg.popup.enabled){
        pubsubMsgs = [... new Set(pubsubMsgs)];
        pubsubMsgs.forEach((item, i) => {  
           this.messageSub(item, this.popup.pubsubHandler.bind(this.popup));
        });
      }
    } else {
      this.error('No renderer for:', this.cfg.renderer);
    }
    this.events = [];
  }
render ( svg ) { svg . setAttribute ( 'viewBox' , this . viewBox . join ( ' ' ) ) console . log ( svg ) ; if ( Hive . Renderer [ this . cfg . renderer . name ] ) { let pubsubMsgs = this . renderer . render ( svg , this . events ) ; if ( this . cfg . popup . enabled ) { pubsubMsgs = [ ... new Set ( pubsubMsgs ) ] ; pubsubMsgs . forEach ( ( item , i ) => { this . messageSub ( item , this . popup . pubsubHandler . bind ( this . popup ) ) ; } ) ; } } else { this . error ( 'No renderer for:' , this . cfg . renderer ) ; } this . events = [ ] ; }
Render an svg
 @param object SVG element
 @return none
Render an svg @param object SVG element @return none
// call renderer w result // subscribe to any groups in cfg