<commit_before><commit_msg>ua/ScrollHandler: added<commit_after>/*
Class: ScrollHandler
Monitor changes in scroll position
*/
/* global clearTimeout, define, setTimeout, window */
define(['jquery', 'tmclasses/tmclasses'], function(jQuery, __tmclasses){
	var __this = __tmclasses.create({
		init: function(){
			this.__parent(arguments);
			if(!this.window){
				this.window = jQuery(window);
			}
			this.window.on('scroll', jQuery.proxy(this.handleChange, this));
		}
		,properties: {
			deinit: function(){
				this.window.off('scroll', jQuery.proxy(this.handleChange, this));
			}
			,delay: 200
			,handleChange: function(){
				var _this = this;
				clearTimeout(this.shortTimeout);
				this.shortTimeout = setTimeout(function(){
					_this.pub('scroll');
				}, this.shortDelay);
				clearTimeout(this.timeout);
				this.timeout = setTimeout(function(){
					_this.pub('change');
				}, this.delay);
			}
			,shortDelay: 40
			,shortTimeout: undefined
			,timeout: undefined
			,window: undefined
		}
	});
	return __this;
});
{'fraction_non_alphanumeric': 0.15518913676042678, 'fraction_numerical': 0.004849660523763337, 'mean_word_length': 4.083743842364532, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '886948', 'n_tokens_mistral': 384, 'n_tokens_neox': 315, 'n_words': 63}