<commit_before>
function EditConnection(graphApi, connection, sdiv, ddiv) {
	this.offset = 0
	this.graphApi = graphApi
	this.srcNode = connection.src_node
	this.srcSlot = connection.src_slot
	this.srcSlotDiv = sdiv
	this.dstNode = connection.dst_node
	this.dstSlot = connection.dst_slot
	this.dstSlotDiv = ddiv
	this.connection = connection
	this.rightToLeft = !!this.dstNode && !this.srcNode

	var c = this.connection
	this.ui = c.ui ? c.ui : c.create_ui()
}

EditConnection.prototype.hoverSlot = function(node, slot) {
	var can = this.canConnectTo(node, slot)

	if (!can)
		return false

	if (this.rightToLeft) {
		this.srcNode = node
		this.srcSlot = slot
	} else {
		this.dstNode = node
		this.dstSlot = slot
	}

	return can
}

EditConnection.prototype.blurSlot = function(slot) {
	if (this.rightToLeft) {
		if (slot === this.dstSlot)
			return;
		this.srcNode = null
		this.srcSlot = null
	} else {
		if (slot === this.srcSlot)
			return;
		this.dstNode = null
		this.dstSlot.is_connected = false
		this.dstSlot = null<commit_msg>fix EditConnection blurSlot when no dstslot<commit_after>
function EditConnection(graphApi, connection, sdiv, ddiv) {
	this.offset = 0
	this.graphApi = graphApi
	this.srcNode = connection.src_node
	this.srcSlot = connection.src_slot
	this.srcSlotDiv = sdiv
	this.dstNode = connection.dst_node
	this.dstSlot = connection.dst_slot
	this.dstSlotDiv = ddiv
	this.connection = connection
	this.rightToLeft = !!this.dstNode && !this.srcNode

	var c = this.connection
	this.ui = c.ui ? c.ui : c.create_ui()
}

EditConnection.prototype.hoverSlot = function(node, slot) {
	var can = this.canConnectTo(node, slot)

	if (!can)
		return false

	if (this.rightToLeft) {
		this.srcNode = node
		this.srcSlot = slot
	} else {
		this.dstNode = node
		this.dstSlot = slot
	}

	return can
}

EditConnection.prototype.blurSlot = function(slot) {
	if (this.rightToLeft) {
		if (slot === this.dstSlot)
			return;
		this.srcNode = null
		this.srcSlot = null
	} else {
		if (slot === this.srcSlot)
			return;
		this.dstNode = null
		if (this.dstSlot)
			this.dstSlot.is_connected = false
		this.dstSlot = null
{'fraction_non_alphanumeric': 0.11456859971711457, 'fraction_numerical': 0.000942951438000943, 'mean_word_length': 3.757847533632287, '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': '4207218', 'n_tokens_mistral': 802, 'n_tokens_neox': 755, 'n_words': 168}