UNPKG

alignment.js

Version:

A suite of reusable [React](http://reactjs.org/) components for creating a variety of visualizations involving [multiple sequence alignments](https://en.wikipedia.org/wiki/Multiple_sequence_alignment). [View the live demo here](http://alignment.hyphy.org/

33 lines (26 loc) 660 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.handleFileChange = handleFileChange; exports.handleTextUpdate = handleTextUpdate; function handleFileChange(e, component) { var files = e.target.files; if (files.length == 1) { var file = files[0], reader = new FileReader(); reader.onload = function (e) { component.setState({ data: e.target.result }); }; reader.readAsText(file); } document.body.click(); } function handleTextUpdate(component) { $("#modal").modal("hide"); component.setState({ data: document.getElementById("input_textarea").value }); }