<commit_before>/***
	Victory View
	A brief celebration of the ultimate tournament winner
***/
define(['require', 'jsclass/min/core', 'client/base/view', 'confetti/confetti', 'jquery.transit/jquery.transit'], function (require) {
	'use strict';
	var View = require('client/base/view');
	
	return new JS.Class(View, {
		'initialize': function() {
			this.callSuper(['tournament_model']);
            this.timer = null;
		},

		'_initTemplate': function() {
            var victory;
			this.callSuper();

			this.container.addClass( 'widget_victory' );
			this.container.append("<img class='winner' /><button class='goback'>Play Again!</button>");
			this.container.find('.goback').click($.proxy(this._controller.onPlayAgainPressed, this._controller));

            // Victory!
            victory = $("<div/>").addClass('victory_image');
            this.container.append(victory);
            victory.transition({
                scale: 20
            }).transition({
                scale: 1
            }, 1000, 'easeInQuad').transition({
                opacity: 0
            }, 3000, 'easeInQuad');
		},

		'_draw': function() {
			var winner;

			winner = this.models.tournament_model.getWinnerData();
			this.container.find('.winner').attr('src', winner.image_url);

            // Confetti!
            clearInterval(this.timer);

            this.timer = setInterval(function() {
                CONFETTIS_PER_SHAKE = 50;

                startConfetti();
            }, 1000);
		},

        'destroy': function() {
            clearInterval(this.timer);
            this.callSuper();
        }
	});
});<commit_msg>Better 'victory' text transition.<commit_after>/***
	Victory View
	A brief celebration of the ultimate tournament winner
***/
define(['require', 'jsclass/min/core', 'client/base/view', 'confetti/confetti', 'jquery.transit/jquery.transit'], function (require) {
	'use strict';
	var View = require('client/base/view');
	
	return new JS.Class(View, {
		'initialize': function() {
			this.callSuper(['tournament_model']);
            this.timer = null;
		},

		'_initTemplate': function() {
            var victory;
			this.callSuper();

			this.container.addClass( 'widget_victory' );
			this.container.append("<img class='winner' /><button class='goback'>Play Again!</button>");
			this.container.find('.goback').click($.proxy(this._controller.onPlayAgainPressed, this._controller));

            // Victory!
            victory = $("<div/>").addClass('victory_image');
            this.container.append(victory);
            victory.transition({
                scale: 30,
                opacity: 0
            }).transition({
                scale: 1,
                opacity: 1
            }, 1000, 'easeInQuad').transition({
                opacity: 0
            }, 3000, 'easeInQuad');
		},

		'_draw': function() {
			var winner;

			winner = this.models.tournament_model.getWinnerData();
			this.container.find('.winner').attr('src', winner.image_url);

            // Confetti!
            clearInterval(this.timer);

            this.timer = setInterval(function() {
                CONFETTIS_PER_SHAKE = 50;

                startConfetti();
            }, 1000);
		},

        'destroy': function() {
            clearInterval(this.timer);
            this.callSuper();
        }
	});
});
{'fraction_non_alphanumeric': 0.1580373269114991, 'fraction_numerical': 0.011438892233594221, 'mean_word_length': 2.2674532940019665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404676', 'n_tokens_mistral': 1067, 'n_tokens_neox': 936, 'n_words': 169}