Skip to content

Commit

Permalink
changing validation for tx segment elemetn since they only require ei…
Browse files Browse the repository at this point in the history
…ther a start or end now, regardless of position in the structure
  • Loading branch information
katiestahl committed Aug 23, 2024
1 parent a8833e4 commit c3d093c
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,8 @@ const TxSegmentCompInput: React.FC<TxSegmentElementInputProps> = ({

const [pendingResponse, setPendingResponse] = useState(false);

/*
Depending on this element's location in the structure array, the user
needs to provide some kind of coordinate input for either one or both ends
of the element. This can change as the user drags the element around the structure
array, or adds other elements to the array.
*/
const hasRequiredEnds =
index !== 0 && index < fusion.length
? (txStartingGenomic && txEndingGenomic) || (startingExon && endingExon)
: index === 0
? txEndingGenomic || endingExon
: txStartingGenomic || startingExon;
txEndingGenomic || endingExon || txStartingGenomic || startingExon;

// programming horror
const inputComplete =
Expand Down

0 comments on commit c3d093c

Please sign in to comment.