Allowing series to be loaded by a single click on sidebar
This commit is contained in:
parent
1a83379868
commit
fdcaea9eb3
@ -142,6 +142,11 @@ export const UISettings = new SimpleSchema({
|
|||||||
label: 'Left sidebar open by default?',
|
label: 'Left sidebar open by default?',
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
},
|
},
|
||||||
|
leftSidebarDragAndDrop: {
|
||||||
|
type: Boolean,
|
||||||
|
label: 'Left sidebar allows thumbnail drag and drop. If false, images will be loaded on single click.',
|
||||||
|
defaultValue: true
|
||||||
|
},
|
||||||
displaySetNavigationLoopOverSeries: {
|
displaySetNavigationLoopOverSeries: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
label: 'The UP/DOWN display set navigation buttons will start over when reach the last display set in viewport?',
|
label: 'The UP/DOWN display set navigation buttons will start over when reach the last display set in viewport?',
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { Template } from 'meteor/templating';
|
|||||||
import { Tracker } from 'meteor/tracker';
|
import { Tracker } from 'meteor/tracker';
|
||||||
import { Session } from 'meteor/session';
|
import { Session } from 'meteor/session';
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
import { cornerstone } from 'meteor/ohif:cornerstone';
|
||||||
|
|
||||||
Template.imageThumbnail.onCreated(() => {
|
Template.imageThumbnail.onCreated(() => {
|
||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
|
|||||||
@ -31,6 +31,9 @@
|
|||||||
height: 100%
|
height: 100%
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
|
img
|
||||||
|
-webkit-user-drag: none
|
||||||
|
|
||||||
.thumbnailLoadingIndicator
|
.thumbnailLoadingIndicator
|
||||||
display: none
|
display: none
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
|
|||||||
@ -9,7 +9,8 @@ Template.thumbnailEntry.onCreated(() => {
|
|||||||
const instance = Template.instance();
|
const instance = Template.instance();
|
||||||
|
|
||||||
// Check if the thumbnails will be draggable or clickable
|
// Check if the thumbnails will be draggable or clickable
|
||||||
instance.isDragAndDrop = _.isUndefined(instance.data.viewportIndex);
|
const isIndexUndefined = _.isUndefined(instance.data.viewportIndex);
|
||||||
|
instance.isDragAndDrop = isIndexUndefined && OHIF.uiSettings.leftSidebarDragAndDrop !== false;
|
||||||
});
|
});
|
||||||
|
|
||||||
Template.thumbnailEntry.events({
|
Template.thumbnailEntry.events({
|
||||||
@ -44,8 +45,14 @@ Template.thumbnailEntry.events({
|
|||||||
// Get the thumbnail stack data
|
// Get the thumbnail stack data
|
||||||
const data = instance.data.thumbnail.stack;
|
const data = instance.data.thumbnail.stack;
|
||||||
|
|
||||||
|
// Get the viewport index
|
||||||
|
let { viewportIndex } = instance.data;
|
||||||
|
if (_.isUndefined(viewportIndex)) {
|
||||||
|
viewportIndex = Session.get('activeViewport') || 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Rerender the viewport using the clicked thumbnail data
|
// Rerender the viewport using the clicked thumbnail data
|
||||||
OHIF.viewerbase.layoutManager.rerenderViewportWithNewDisplaySet(instance.data.viewportIndex, data);
|
OHIF.viewerbase.layoutManager.rerenderViewportWithNewDisplaySet(viewportIndex, data);
|
||||||
},
|
},
|
||||||
|
|
||||||
// Event handlers for double click
|
// Event handlers for double click
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user