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/

39 lines (33 loc) 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireDefault(require("react")); var _d3ReactAxis = require("d3-react-axis"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function AlignmentJSAxisTop(props) { return /*#__PURE__*/_react["default"].createElement("div", { style: { width: props.width, height: props.height } }, /*#__PURE__*/_react["default"].createElement("svg", { width: props.width, height: props.height }, /*#__PURE__*/_react["default"].createElement("text", { x: props.width / 2, y: props.height / 4, textAnchor: "middle", alignmentBaseline: "middle" }, props.label), /*#__PURE__*/_react["default"].createElement(_d3ReactAxis.AxisTop, { scale: props.scale, ticks: props.ticks, transform: "translate(0, ".concat(props.height - 1, ")") }))); } _d3ReactAxis.AxisTop.defaultProps = { ticks: [5] }; var _default = AlignmentJSAxisTop; exports["default"] = _default;