Moving latest changes from Nucleus viewer back to OHIF Viewers
This commit is contained in:
parent
bdbf807565
commit
9a7a2051e1
@ -42,10 +42,20 @@ Template.cineDialog.onCreated(() => {
|
||||
return;
|
||||
}
|
||||
|
||||
let playClipData = cornerstoneTools.getToolState(element, 'playClip');
|
||||
if (!playClipData || !playClipData.data || !playClipData.data.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
// A valid playClip data object is available.
|
||||
playClipData = playClipData.data[0];
|
||||
|
||||
// If the movie is playing, stop/start to update the framerate
|
||||
if (viewportUtils.isPlaying()) {
|
||||
if (playClipData.intervalId !== void 0) {
|
||||
cornerstoneTools.stopClip(element);
|
||||
cornerstoneTools.playClip(element, OHIF.viewer.cine.framesPerSecond);
|
||||
} else {
|
||||
playClipData.framesPerSecond = OHIF.viewer.cine.framesPerSecond;
|
||||
}
|
||||
|
||||
Session.set('UpdateCINE', Random.id());
|
||||
@ -250,9 +260,12 @@ Template.cineDialog.onDestroyed(() => {
|
||||
Template.cineDialog.events({
|
||||
'change [data-key=loop] input'(event, instance) {
|
||||
const element = viewportUtils.getActiveViewportElement();
|
||||
const playClipToolData = cornerstoneTools.getToolState(element, 'playClip');
|
||||
playClipToolData.data[0].loop = $(event.currentTarget).is(':checked');
|
||||
OHIF.viewer.cine.loop = playClipToolData.data[0].loop;
|
||||
OHIF.viewer.cine.loop = $(event.currentTarget).is(':checked');
|
||||
// Update playClip tool data if available.
|
||||
let playClipData = cornerstoneTools.getToolState(element, 'playClip');
|
||||
if (playClipData && playClipData.data && playClipData.data.length > 0) {
|
||||
playClipData.data[0].loop = OHIF.viewer.cine.loop;
|
||||
}
|
||||
},
|
||||
|
||||
'input [data-key=framesPerSecond] input'(event, instance) {
|
||||
|
||||
@ -96,7 +96,9 @@
|
||||
.optionsDiv
|
||||
padding-top: 10px
|
||||
|
||||
|
||||
//Avoids Cine Play and Text Marker dialog to overlap
|
||||
#textMarkerOptionsDialog[open='open'] ~ #cineDialog[open='open']
|
||||
bottom: 90px
|
||||
|
||||
.relabelButtons
|
||||
text-align:right
|
||||
|
||||
@ -7,8 +7,8 @@ import { crosshairsSynchronizers } from './crosshairsSynchronizers';
|
||||
import { annotateTextUtils } from './annotateTextUtils';
|
||||
import { textMarkerUtils } from './textMarkerUtils';
|
||||
|
||||
let activeTool = 'wwwc';
|
||||
let defaultTool = 'wwwc';
|
||||
let activeTool;
|
||||
|
||||
let tools = {};
|
||||
|
||||
@ -112,8 +112,10 @@ export const toolManager = {
|
||||
touch: cornerstoneTools.crosshairsTouch
|
||||
});
|
||||
|
||||
// if a default tool is globally defined, make it the default tool...
|
||||
if (OHIF.viewer.defaultTool) {
|
||||
activeTool = OHIF.viewer.defaultTool;
|
||||
defaultTool = OHIF.viewer.defaultTool;
|
||||
activeTool = defaultTool;
|
||||
}
|
||||
|
||||
this.configureTools();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user