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