From e103c380b58f3dae6f3fe5dff426a3c4aaff798f Mon Sep 17 00:00:00 2001 From: Josiah Seaman Date: Mon, 3 Feb 2020 16:24:16 -0700 Subject: [PATCH] #9 Removed the 2 error link cells that have no compressed_row_mapping[] --- src/LinkColumn.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LinkColumn.js b/src/LinkColumn.js index 81096243..813a6fe4 100644 --- a/src/LinkColumn.js +++ b/src/LinkColumn.js @@ -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 @@ -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}