percentComplete() {
            var total_trials = this.length();
            var completed_trials = 0;
            for (var i = 0; i < this.timeline_parameters.timeline.length; i++) {
                if (this.timeline_parameters.timeline[i].isComplete()) {
                    completed_trials += this.timeline_parameters.timeline[i].length();
                }
            }
            return (completed_trials / total_trials) * 100;
        }
// counts a set of trials as complete when the child node is done

counts a set of trials as complete when the child node is done
counts a set of trials as complete when the child node is done
percentComplete() {
            var total_trials = this.length();
            var completed_trials = 0;
            for (var i = 0; i < this.timeline_parameters.timeline.length; i++) {
                if (this.timeline_parameters.timeline[i].isComplete()) {
                    completed_trials += this.timeline_parameters.timeline[i].length();
                }
            }
            return (completed_trials / total_trials) * 100;
        }
percentComplete ( ) { var total_trials = this . length ( ) ; var completed_trials = 0 ; for ( var i = 0 ; i < this . timeline_parameters . timeline . length ; i ++ ) { if ( this . timeline_parameters . timeline [ i ] . isComplete ( ) ) { completed_trials += this . timeline_parameters . timeline [ i ] . length ( ) ; } } return ( completed_trials / total_trials ) * 100 ; }
counts a set of trials as complete when the child node is done
counts a set of trials as complete when the child node is done