Skip to content

Commit

Permalink
Fix mouseover at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 23, 2024
1 parent 82bc2b9 commit 60acd55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ProteinView/components/ProteinAlignment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const ProteinAlignment = observer(function ({
model: JBrowsePluginProteinStructureModel
}) {
const {
structureSeqHoverPos,
alignment,
structurePositionToAlignmentMap,
alignmentToStructurePosition,
structurePositionToAlignmentMap,
structureSeqHoverPos,
showHighlight,
} = model
if (!alignment) {
Expand Down
8 changes: 5 additions & 3 deletions src/ProteinView/structureModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,11 @@ const Structure = types
) {
const { hoverPosition } = hovered
const pos = genomeToTranscriptSeqMapping.g2p[hoverPosition.coord]
const c0 = pos
? transcriptSeqToStructureSeqPosition?.[pos]
: undefined
const c0 =
pos === undefined
? undefined
: transcriptSeqToStructureSeqPosition?.[pos]

if (c0 !== undefined) {
self.setHoveredPosition({
structureSeqPos: c0,
Expand Down

0 comments on commit 60acd55

Please sign in to comment.