Skip to content

Commit

Permalink
#9 Removed the 2 error link cells that have no compressed_row_mapping[]
Browse files Browse the repository at this point in the history
  • Loading branch information
josiahseaman committed Feb 3, 2020
1 parent 61292b2 commit e103c38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LinkColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class LinkColumn extends React.Component {
linkCells() {
let alpha = [];
for(const [i, boolean] of this.props.item.participants.entries()) {
if (boolean) {
if (boolean && this.props.compressed_row_mapping.hasOwnProperty(i)) {
let row = this.props.compressed_row_mapping[i] * this.props.store.pixelsPerRow;
if(row !== undefined){ // it's possible a row didn't have enough coverage but still created a Link
alpha.push(row) //relative compressed Y coordinate
Expand All @@ -40,7 +40,7 @@ class LinkColumn extends React.Component {
key={"dot" + d}
x={this.props.x}
y={this.props.store.topOffset + y_coord}
width={this.props.width}
width={this.props.store.pixelsPerColumn}
height={this.props.store.pixelsPerRow}
fill={this.props.color}
// onClick={this.handleClick}
Expand Down

0 comments on commit e103c38

Please sign in to comment.