Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed Oct 30, 2023
1 parent efe19fb commit a503598
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/apollo-mst/src/AnnotationFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ export const AnnotationFeature = types
const dl = self.discontinuousLocations
if (dl && dl.length > 0 && dl[index].end !== end) {
dl[index].end = end
// When we change the end of first discontinuous location then we need to change the end of the CDS - We are storing the coordinates of
// first discontinuous location.
if (index === 0) {
self.end = end
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export class DiscontinuousLocationEndChange extends FeatureChange {
throw new Error(errMsg)
}
feature.discontinuousLocations[index].end = newEnd
// When we change the end of first discontinuous location then we need to change the end of the CDS - We are storing the coordinates of
// first discontinuous location.
if (index === 0) {
feature.end = newEnd
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export class DiscontinuousLocationStartChange extends FeatureChange {
logger.error(errMsg)
throw new Error(errMsg)
}

const oldStart = feature.discontinuousLocations[index].start
if (oldStart !== expectedOldStart) {
const errMsg = `Location's current start value ${oldStart} doesn't match with expected value ${expectedOldStart}`
Expand Down

0 comments on commit a503598

Please sign in to comment.