src/core.js
/**
  * Checks that all imports are finished, then starts the config parsing
  *
  * @param object Keys of objects in the config
  * @param object Array of promises
  * @param object Utility Functions
  * @return none
  */
Checks that all imports are finished, then starts the config parsing
@param object Keys of objects in the config
@param object Array of promises
@param object Utility Functions
@return none
Checks that all imports are finished then starts the config parsing @param object Keys of objects in the config @param object Array of promises @param object Utility Functions @return none
async bootstrap(keys, promises, handlers) {
    try {
      let fontRv = await Promise.all(this.fontPromises)
      fontRv.forEach((f, i) => {
        if (f.status == 'loaded')
          document.fonts.add(f); 
      });
      await Promise.all(promises.concat(this.tk.data.promises)); 
    } catch(e) {
      console.error(e);
    }
    this.tk.draw = new Hive.Draw(handlers);
    this.v.draw = this.tk.draw.resolveCfg(this.v.draw);
		keys.forEach((item, i) => { 
      if(typeof(this.v[item]) == "object")
        this.tk[item].entry(this.v[item]);
		});
    this.tk.element.getElement()._visualization = this;
    this.sendStateChange('PARSE_CFG_END', this);
	}
async bootstrap ( keys , promises , handlers ) { try { let fontRv = await Promise . all ( this . fontPromises ) fontRv . forEach ( ( f , i ) => { if ( f . status == 'loaded' ) document . fonts . add ( f ) ; } ) ; await Promise . all ( promises . concat ( this . tk . data . promises ) ) ; } catch ( e ) { console . error ( e ) ; } this . tk . draw = new Hive . Draw ( handlers ) ; this . v . draw = this . tk . draw . resolveCfg ( this . v . draw ) ; keys . forEach ( ( item , i ) => { if ( typeof ( this . v [ item ] ) == "object" ) this . tk [ item ] . entry ( this . v [ item ] ) ; } ) ; this . tk . element . getElement ( ) . _visualization = this ; this . sendStateChange ( 'PARSE_CFG_END' , this ) ; }
Checks that all imports are finished, then starts the config parsing
 @param object Keys of objects in the config
 @param object Array of promises
 @param object Utility Functions
 @return none
Checks that all imports are finished then starts the config parsing @param object Keys of objects in the config @param object Array of promises @param object Utility Functions @return none
// add font to document // should be allSettled? // Load plugins late as promises could create new draw entries // let modPaths = this.v.draw.map(d => {if (!Hive.Plugins[d.name]) return `./plugins/${d.name}.js`}).filter(d=>d); // let drawPaths = [...new Set(modPaths)]; // let drawPromises = drawPaths.map(d => import(d)); // await Promise.all(drawPromises); // draw init follows plugin loading // run all entry points