function loadDroppedAnimation(file)
    {
        let loaded;
        return new Promise((resolve, reject) => {
            let reader = new FileReader();
            reader.readAsText(file, "UTF-8");

            // On load resolve
            reader.addEventListener('load', resolve);

            // On progress, update progress bar
            reader.addEventListener('progress', evt => {

                if ((evt.loaded / evt.total) == 1) { // hide progress bar once loaded
                  document.getElementById('progress-holder').style.display = 'none';
                }

                let amtLoaded = (evt.loaded / evt.total) * 100;
                let theWidth = amtLoaded.toString();
                theWidth = theWidth + '%';
                document.getElementById('progress-bar').style.width = theWidth; // update progress bar
            });
        });
    }
/* ------------------------------------------------------------------------
     * loadDroppedAnimation:
     * ------------------------------------------------------------------------
     * param file - dragged and dropped log-file
     *
     * Returns a promise that resolves to a model being loaded from file data
     * converted to json.
     */


param file - dragged and dropped log-file

Returns a promise that resolves to a model being loaded from file data
converted to json.
param file - dragged and dropped log - file Returns a promise that resolves to a model being loaded from file data converted to json .
function loadDroppedAnimation(file)
    {
        let loaded;
        return new Promise((resolve, reject) => {
            let reader = new FileReader();
            reader.readAsText(file, "UTF-8");
            reader.addEventListener('load', resolve);
            reader.addEventListener('progress', evt => {
                if ((evt.loaded / evt.total) == 1) { 
                  document.getElementById('progress-holder').style.display = 'none';
                }
                let amtLoaded = (evt.loaded / evt.total) * 100;
                let theWidth = amtLoaded.toString();
                theWidth = theWidth + '%';
                document.getElementById('progress-bar').style.width = theWidth; 
            });
        });
    }
function loadDroppedAnimation ( file ) { let loaded ; return new Promise ( ( resolve , reject ) => { let reader = new FileReader ( ) ; reader . readAsText ( file , "UTF-8" ) ; reader . addEventListener ( 'load' , resolve ) ; reader . addEventListener ( 'progress' , evt => { if ( ( evt . loaded / evt . total ) == 1 ) { document . getElementById ( 'progress-holder' ) . style . display = 'none' ; } let amtLoaded = ( evt . loaded / evt . total ) * 100 ; let theWidth = amtLoaded . toString ( ) ; theWidth = theWidth + '%' ; document . getElementById ( 'progress-bar' ) . style . width = theWidth ; } ) ; } ) ; }
loadDroppedAnimation:
loadDroppedAnimation :
// On load resolve // On progress, update progress bar // hide progress bar once loaded // update progress bar