Bug Fix: Double click was not working when no viewport is active
This commit is contained in:
parent
a8ee17dc71
commit
f94d951453
@ -41,8 +41,13 @@ Template.thumbnailEntry.events({
|
|||||||
|
|
||||||
// Event handlers for double click
|
// Event handlers for double click
|
||||||
'dblclick .thumbnailEntry'(event, instance) {
|
'dblclick .thumbnailEntry'(event, instance) {
|
||||||
// Get the active viewport index
|
|
||||||
const viewportIndex = Session.get('activeViewport') || 0;
|
// Get the active viewport index and total number of viewports...
|
||||||
|
const viewportCount = OHIF.viewerbase.layoutManager.getNumberOfViewports();
|
||||||
|
let viewportIndex = Session.get('activeViewport') || 0;
|
||||||
|
if (viewportIndex >= viewportCount) {
|
||||||
|
viewportIndex = viewportCount > 0 ? viewportCount - 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Get the thumbnail stack data
|
// Get the thumbnail stack data
|
||||||
const data = instance.data.thumbnail.stack;
|
const data = instance.data.thumbnail.stack;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user