Skip to content
Snippets Groups Projects
Unverified Commit a11ea77a authored by Jack Reed's avatar Jack Reed Committed by GitHub
Browse files

Remove topranges from multi sequence selection fixes #3335 (#3337)

parent 67b1d04c
No related branches found
No related tags found
No related merge requests found
......@@ -34,8 +34,8 @@ describe('getSequences', () => {
};
const state = { manifests: { x: { json: manifest } } };
const sequences = getSequences(state, { manifestId: 'x' });
expect(sequences.length).toEqual(3);
expect(sequences.map(s => s.id)).toEqual(['https://iiif.bodleian.ox.ac.uk/iiif/sequence/9cca8fdd-4a61-4429-8ac1-f648764b4d6d_default.json', 'a', 'b']);
expect(sequences.length).toEqual(1);
expect(sequences.map(s => s.id)).toEqual(['https://iiif.bodleian.ox.ac.uk/iiif/sequence/9cca8fdd-4a61-4429-8ac1-f648764b4d6d_default.json']);
});
describe('with a v3 manifest', () => {
const manifest = {
......
......@@ -25,10 +25,11 @@ const mapStateToProps = (state, { id, windowId }) => {
const companionWindow = getCompanionWindow(state, { companionWindowId: id });
const collectionPath = window.collectionPath || [];
const collectionId = collectionPath && collectionPath[collectionPath.length - 1];
const sequence = getSequence(state, { windowId });
return {
collection: collectionId && getManifestoInstance(state, { manifestId: collectionId }),
config,
sequenceId: getSequence(state, { windowId }).id,
sequenceId: sequence && sequence.id,
sequences: getSequences(state, { windowId }),
showToc: treeStructure && treeStructure.nodes && treeStructure.nodes.length > 0,
variant: companionWindow.variant || getDefaultSidebarVariant(state, { windowId }),
......
......@@ -21,8 +21,6 @@ export const getSequences = createSelector(
const sequences = [].concat(
// v2: multi-sequence manifests, or v3: items
manifest.getSequences(),
// v2: top ranges
v2TopRanges,
// v3: all top-level ranges with behavior=sequence
v3RangeSequences,
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment