import/DownloadTaskCollection.js
/**
     * The aggregate progress for all of the included tasks
     */
The aggregate progress for all of the included tasks
The aggregate progress for all of the included tasks
get progress()
    {
        const tasks = this.tasks.filter(t => !t.error);
        if (!tasks.length) {
            return 1;
        }
        let position = 0;
        let total = 0;
        tasks.forEach(t => {
            position += Math.max(t.position, 0);
            total    += Math.max(t.total, 0);
        });
        if (!total || !position) {
            return 0;
        }
        return position / total;
    }
get progress ( ) { const tasks = this . tasks . filter ( t => ! t . error ) ; if ( ! tasks . length ) { return 1 ; } let position = 0 ; let total = 0 ; tasks . forEach ( t => { position += Math . max ( t . position , 0 ) ; total += Math . max ( t . total , 0 ) ; } ) ; if ( ! total || ! position ) { return 0 ; } return position / total ; }
The aggregate progress for all of the included tasks
The aggregate progress for all of the included tasks