AWV-1: Fixing grid navigation for 1x1 layout
This commit is contained in:
parent
54481cf716
commit
e8930230e7
@ -109,7 +109,8 @@ OHIF.viewer.canMoveDisplaySets = isNext => {
|
|||||||
const firstIndex = studyViewports[0].displaySetIndex;
|
const firstIndex = studyViewports[0].displaySetIndex;
|
||||||
const steps = studyViewports.length;
|
const steps = studyViewports.length;
|
||||||
const amount = study.displaySets.length;
|
const amount = study.displaySets.length;
|
||||||
const lastStepIndex = amount - (amount % steps);
|
const move = (amount % steps) || steps;
|
||||||
|
const lastStepIndex = amount - move;
|
||||||
if (firstIndex + steps !== lastStepIndex + steps) {
|
if (firstIndex + steps !== lastStepIndex + steps) {
|
||||||
endReached = false;
|
endReached = false;
|
||||||
}
|
}
|
||||||
@ -227,7 +228,8 @@ OHIF.viewer.moveMultipleViewportDisplaySets = isNext => {
|
|||||||
|
|
||||||
// Check if the indexes are sequenced or will overflow the array bounds
|
// Check if the indexes are sequenced or will overflow the array bounds
|
||||||
if (baseIndex >= amount) {
|
if (baseIndex >= amount) {
|
||||||
const lastStepIndex = amount - (amount % steps);
|
const move = (amount % steps) || steps;
|
||||||
|
const lastStepIndex = amount - move;
|
||||||
if (firstIndex + steps !== lastStepIndex + steps) {
|
if (firstIndex + steps !== lastStepIndex + steps) {
|
||||||
// Reset the index if the display sets are sequenced but shifted
|
// Reset the index if the display sets are sequenced but shifted
|
||||||
baseIndex = lastStepIndex;
|
baseIndex = lastStepIndex;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user