{"size": 1174, "ext": "js", "max_stars_repo_path": "src/ComponentNucleotides.js", "max_stars_repo_name": "urbanslug/Schematize", "max_stars_repo_stars_event_min_datetime": "2019-11-25T12:37:28.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-10T15:35:36.000Z", "max_issues_repo_path": "src/ComponentNucleotides.js", "max_issues_repo_name": "urbanslug/Schematize", "max_issues_repo_issues_event_min_datetime": "2019-11-26T12:31:18.000Z", "max_issues_repo_issues_event_max_datetime": "2020-11-20T17:01:00.000Z", "max_forks_repo_path": "src/ComponentNucleotides.js", "max_forks_repo_name": "urbanslug/Schematize", "max_forks_repo_forks_event_min_datetime": "2020-03-27T15:40:57.000Z", "max_forks_repo_forks_event_max_datetime": "2020-06-15T14:57:48.000Z"}
{"max_stars_count": 8, "max_issues_count": 86, "max_forks_count": 8, "avg_line_length": 26.6818181818, "max_line_length": 75, "alphanum_fraction": 0.6422487223}
import React from "react";
import { Text } from "react-konva";
import PropTypes from "prop-types";

class ComponentNucleotides extends React.Component {
  renderMatrixRow() {
    const parent = this.props.item;
    const x_val =
      parent.relativePixelX +
      parent.arrivals.length * this.props.store.pixelsPerColumn;

    //console.log('x_val: ' + x_val)

    var listOfObjects = [];
    for (var x = 0; x < this.props.item.num_bin; x++) {
      listOfObjects.push(
        <Text
          key={"nuc_text" + x}
          x={x_val + x * this.props.store.pixelsPerColumn}
          y={this.props.store.topOffset - this.props.store.pixelsPerColumn}
          text={this.props.nucleotides[x]}
          align="center"
          height={this.props.store.pixelsPerColumn}
          width={this.props.store.pixelsPerColumn}
          fontSize={this.props.store.pixelsPerColumn + 2}
        />
      );
    }
    return listOfObjects;
  }

  render() {
    //console.log('ComponentNucleotides - render')
    return this.renderMatrixRow();
  }
}

ComponentNucleotides.propTypes = {
  store: PropTypes.object,
  item: PropTypes.object,
};

export default ComponentNucleotides;
