<commit_before>/// mixin provides touch swipe events
BaseMixin {
	signal touchMove;			///< @private
	signal touchStart;			///< @private
	signal verticalSwiped;		///< emitted on vertical swipe
	signal horizontalSwiped;	///< emitted on horizontal swipe
	property bool enabled: true;	///< enable mixin flag

	constructor: { this._bindTouch(this.enabled) }

	onEnabledChanged: { this._bindTouch(value) }

	///@private
	function _bindTouch(value) {
		if (value && !this._touchBinder) {
			this._touchBinder = new _globals.core.EventBinder(this.parent.element)
			this._touchBinder.on('touchstart', 	function(event) { this.touchStart(event) }.bind(this))
			this._touchBinder.on('touchmove', 	function(event) { this.touchMove(event) }.bind(this))
		}
		if (this._touchBinder)
			this._touchBinder.enable(value)
	}

	///@private
	onTouchStart(event): {
		var box = this.parent.toScreen()
		var e = event.touches[0]
		var x = e.pageX - box[0]
		var y = e.pageY - box[1]<commit_msg>Add touch end event in SwipeMixin<commit_after>/// mixin provides touch swipe events
BaseMixin {
	signal touchMove;			///< @private
	signal touchStart;			///< @private
	signal touchEnd;			///< @private
	signal verticalSwiped;		///< emitted on vertical swipe
	signal horizontalSwiped;	///< emitted on horizontal swipe
	property bool enabled: true;	///< enable mixin flag

	constructor: { this._bindTouch(this.enabled) }

	onEnabledChanged: { this._bindTouch(value) }

	///@private
	function _bindTouch(value) {
		if (value && !this._touchBinder) {
			this._touchBinder = new _globals.core.EventBinder(this.parent.element)
			this._touchBinder.on('touchstart', function(event) { this.touchStart(event) }.bind(this))
			this._touchBinder.on('touchend', function(event) { this.touchEnd(event) }.bind(this))
			this._touchBinder.on('touchmove', function(event) { this.touchMove(event) }.bind(this))
		}
		if (this._touchBinder)
			this._touchBinder.enable(value)
	}

	///@private
	onTouchStart(event): {
		var box = this.parent.toScreen()
		var e = event.touches[0]
		var x = e.pageX - box[0]
		var y = e.pageY - box[1]
{'fraction_non_alphanumeric': 0.14518447532343076, 'fraction_numerical': 0.0028749401054144704, 'mean_word_length': 3.9952153110047846, 'pattern_counts': {'":': 0, '<': 14, '<?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': '2447010', 'n_tokens_mistral': 774, 'n_tokens_neox': 724, 'n_words': 155}