Skip to content

Commit

Permalink
Merge pull request cu-mkp#116 from cu-mkp/RB-fix-variorum-nav
Browse files Browse the repository at this point in the history
Improved variorum navigation and fixed folio name collision bug
  • Loading branch information
ajolipa authored May 8, 2024
2 parents c3e0648 + 735010d commit 6ae3c6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editioncrafter/src/action/DocumentActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function parseSingleManifest(manifest, transcriptionTypes, document) {
const thumbnailURL = `${bodyId}/full/${thumbnailDimensions.join(',')}/0/default.jpg`;

const folio = {
id: folioID,
id: document ? `${document}_${folioID}` : folioID,
doc_id: document || manifest.id,
name: canvasLabel,
pageNumber: i,
Expand Down
4 changes: 3 additions & 1 deletion editioncrafter/src/component/DocumentView.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ const DocumentView = (props) => {
hasNext: current_hasNext,
previousFolioShortID: prevID,
nextFolioShortID: nextID,
documentID: doc.variorum ? doc.folioIndex[shortID].doc_id : doc.documentName,
};
};

Expand All @@ -384,6 +385,7 @@ const DocumentView = (props) => {
const viewType = determineViewType(side);
const key = viewPaneKey(side);
const folioID = docView[side].iiifShortID;
const document = docView[side].documentID;
const { transcriptionType } = docView[side];

if (viewType === 'ImageView') {
Expand Down Expand Up @@ -425,7 +427,7 @@ const DocumentView = (props) => {
documentView={docView}
documentViewActions={documentViewActions}
side={side}
selectedDoc={props.document.variorum && Object.keys(props.document.derivativeNames)[side === 'left' ? 0 : side === 'right' ? 1 : Object.keys(props.document.derivativeNames).length > 2 ? 2 : 1]}
selectedDoc={document ? document : props.document.variorum && Object.keys(props.document.derivativeNames)[side === 'left' ? 0 : side === 'right' ? 1 : Object.keys(props.document.derivativeNames).length > 2 ? 2 : 1]}
/>
);
} if (viewType === 'GlossaryView') {
Expand Down

0 comments on commit 6ae3c6c

Please sign in to comment.