From a503598e3a5d837f16af8831bb57bdb31488f5cd Mon Sep 17 00:00:00 2001 From: Shashank Budhanuru Ramaraju Date: Mon, 30 Oct 2023 09:59:23 +0000 Subject: [PATCH] changes --- packages/apollo-mst/src/AnnotationFeature.ts | 2 ++ .../apollo-shared/src/Changes/DiscontinuousLocationEndChange.ts | 2 ++ .../src/Changes/DiscontinuousLocationStartChange.ts | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/apollo-mst/src/AnnotationFeature.ts b/packages/apollo-mst/src/AnnotationFeature.ts index c7016e11..1cbca1b7 100644 --- a/packages/apollo-mst/src/AnnotationFeature.ts +++ b/packages/apollo-mst/src/AnnotationFeature.ts @@ -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 } diff --git a/packages/apollo-shared/src/Changes/DiscontinuousLocationEndChange.ts b/packages/apollo-shared/src/Changes/DiscontinuousLocationEndChange.ts index b6155365..11e1961f 100644 --- a/packages/apollo-shared/src/Changes/DiscontinuousLocationEndChange.ts +++ b/packages/apollo-shared/src/Changes/DiscontinuousLocationEndChange.ts @@ -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 } diff --git a/packages/apollo-shared/src/Changes/DiscontinuousLocationStartChange.ts b/packages/apollo-shared/src/Changes/DiscontinuousLocationStartChange.ts index b052e52d..9b7953d8 100644 --- a/packages/apollo-shared/src/Changes/DiscontinuousLocationStartChange.ts +++ b/packages/apollo-shared/src/Changes/DiscontinuousLocationStartChange.ts @@ -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}`