From d5a536beaf4144ea10fa251717f3add1e1a8e533 Mon Sep 17 00:00:00 2001 From: Greg Naimoli Date: Tue, 17 May 2022 16:03:07 -0400 Subject: [PATCH 1/2] update the alignment and title info based on input value --- src/Alignment.jsx | 3 ++- src/app/FASTA/start_at_site_and_sequence.jsx | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Alignment.jsx b/src/Alignment.jsx index 51805ca..4c7a4b8 100644 --- a/src/Alignment.jsx +++ b/src/Alignment.jsx @@ -56,7 +56,8 @@ class Alignment extends Component { !_.isEqual(this.props.molecule, nextProps.molecule) || !_.isEqual(this.props.site_color, nextProps.site_color) || !_.isEqual(this.props.text_color, nextProps.text_color), - should_update = !same_fasta || different_coloring; + newXCoord = _.isEqual(this.props.x_pixel, nextProps.x_pixel), + should_update = !same_fasta || different_coloring || newXCoord; if (should_update) { this.initialize(nextProps); return true; diff --git a/src/app/FASTA/start_at_site_and_sequence.jsx b/src/app/FASTA/start_at_site_and_sequence.jsx index 2ac335d..8d22886 100644 --- a/src/app/FASTA/start_at_site_and_sequence.jsx +++ b/src/app/FASTA/start_at_site_and_sequence.jsx @@ -23,7 +23,11 @@ class StartAtSiteAndSequence extends Component { return (
-

Begin centered on a given sequence (CY010004) and site (100).

+

+ Begin centered on a given sequence (CY010004) and site ({ + this.state.site + }). +

Date: Thu, 9 Jun 2022 16:35:24 -0400 Subject: [PATCH 2/2] changed variable name to follow snake case naming convention --- src/Alignment.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Alignment.jsx b/src/Alignment.jsx index 4c7a4b8..a51756d 100644 --- a/src/Alignment.jsx +++ b/src/Alignment.jsx @@ -56,8 +56,8 @@ class Alignment extends Component { !_.isEqual(this.props.molecule, nextProps.molecule) || !_.isEqual(this.props.site_color, nextProps.site_color) || !_.isEqual(this.props.text_color, nextProps.text_color), - newXCoord = _.isEqual(this.props.x_pixel, nextProps.x_pixel), - should_update = !same_fasta || different_coloring || newXCoord; + new_x_coord = _.isEqual(this.props.x_pixel, nextProps.x_pixel), + should_update = !same_fasta || different_coloring || new_x_coord; if (should_update) { this.initialize(nextProps); return true;