From 999cb99eb805a305d848cf79eb03fb40650d7833 Mon Sep 17 00:00:00 2001 From: David Sehnal <david.sehnal@gmail.com> Date: Thu, 14 Nov 2019 06:09:30 +0100 Subject: [PATCH] mol-data: fixed bug in isSubsetIS --- src/mol-data/int/_spec/ordered-set.spec.ts | 2 +- src/mol-data/int/impl/ordered-set.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mol-data/int/_spec/ordered-set.spec.ts b/src/mol-data/int/_spec/ordered-set.spec.ts index 00100fc37..04ca406f4 100644 --- a/src/mol-data/int/_spec/ordered-set.spec.ts +++ b/src/mol-data/int/_spec/ordered-set.spec.ts @@ -6,7 +6,7 @@ import OrderedSet from '../ordered-set' import Interval from '../interval' -import SortedArray from '../sorted-array'; +//import SortedArray from '../sorted-array'; describe('ordered set', () => { function ordSetToArray(set: OrderedSet) { diff --git a/src/mol-data/int/impl/ordered-set.ts b/src/mol-data/int/impl/ordered-set.ts index 6ae890451..75e687316 100644 --- a/src/mol-data/int/impl/ordered-set.ts +++ b/src/mol-data/int/impl/ordered-set.ts @@ -126,7 +126,7 @@ function isSubsetIS(a: I, b: S) { const minA = I.min(a), maxA = I.max(a); if (maxA - minA + 1 === 0) return false; const minB = S.min(b), maxB = S.max(b); - return minB >= minA && maxA <= maxB; + return minB >= minA && maxB <= maxA; } function areRangesIntersecting(a: OrderedSetImpl, b: OrderedSetImpl) { -- GitLab