All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.citec.tcs.alignment.visualization.setAlignmentCell.js Maven / Gradle / Ivy

Go to download

This module contains means to visualize Alignments. The most important interface is the Visualizer class. A trivial implementation (essentially just using toString()) is the StringVisualizer. A more sophisticated example that is recommended for outside use is the HTMLVisualizer. All other classes are helper classes for said HTMLVisualizer.

The newest version!
/**
 * When visualizeMatrix of the HTMLVisualizer is called, this function has the
 * purpose to set which AlignmentPath is displayed.
 */

function setAlignmentCell(cell) {
	// get the id
	var id = cell.id;
	// set the corresponding src in the frame.
	var frame = document.getElementById('alignFrame');
	// ensure that column visibility is reset on frame loading
	frame.onload = function () {
		resetColumnVisibility();
	};
	// then set the source.
	frame.src = "alignments/" + id + ".html";
}

function resetColumnVisibility() {
	var selector = "input.tglCol";
	var checkboxes = document.querySelectorAll(selector);
	for (var i = 0; i < checkboxes.length; i++) {
		if (!checkboxes[i].checked) {
			toggleColumn(checkboxes[i]);
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy