Fix OHIF global variable definition bug in OHIF Viewer, moved resizeViewportElements to viewerbase
This commit is contained in:
1 parent
37fa29cce4
commit
86c8a32e2a
8 files changed
+31
-48
No files matched your search
@@ -65,7 +65,7 @@
|
||||
bottom: 0
|
||||
overflow: auto
|
||||
width: 100%
|
||||
|
||||
padding-bottom: 20px
|
||||
|
||||
tr.selectedRow
|
||||
background: #F5F5F5 !important
|
||||
|
||||
@@ -62,13 +62,11 @@ Package.onUse(function (api) {
|
||||
|
||||
// Library functions
|
||||
api.addFiles('lib/uuid.js', 'client');
|
||||
api.addFiles('lib/resizeViewportElements.js', 'client');
|
||||
api.addFiles('lib/toggleLesionTrackerTools.js', 'client');
|
||||
api.addFiles('lib/clearTools.js', 'client');
|
||||
|
||||
// Export lesionTable function for activate measurements
|
||||
api.export('activateLesion','client');
|
||||
api.export('resizeViewportElements','client');
|
||||
api.export('toggleLesionTrackerTools', 'client');
|
||||
api.export('clearTools', 'client');
|
||||
api.export('measurementManagerDAL', 'client');
|
||||
|
||||
@@ -23,6 +23,13 @@ Template.playClipButton.helpers({
|
||||
'isPlaying': function() {
|
||||
Session.get('UpdateCINE');
|
||||
var activeViewport = Session.get('activeViewport');
|
||||
|
||||
// TODO=Check best way to make sure this is always defined
|
||||
// Right now it is initialized in enableHotkeys AND in
|
||||
// imageViewer onCreated, but this appears to break some things
|
||||
if (!OHIF.viewer.isPlaying) {
|
||||
return;
|
||||
}
|
||||
return !!OHIF.viewer.isPlaying[activeViewport];
|
||||
}
|
||||
});
|
||||
|
||||
+12
@@ -1,3 +1,15 @@
|
||||
var resizeTimer;
|
||||
|
||||
handleResize = function() {
|
||||
// Avoid doing DOM manipulation during the resize handler
|
||||
// because it is fired very often.
|
||||
// Resizing is therefore performed 100 ms after the resize event stops.
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(function() {
|
||||
resizeViewportElements();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
// Resize viewport elements
|
||||
resizeViewportElements = function() {
|
||||
viewportResizeTimer = setTimeout(function() {
|
||||
@@ -72,7 +72,10 @@ toolManager = {
|
||||
mouse: cornerstoneTools.arrowAnnotate,
|
||||
touch: cornerstoneTools.arrowAnnotateTouch
|
||||
});
|
||||
activeTool = OHIF.viewer.defaultTool;
|
||||
|
||||
if (OHIF.viewer.defaultTool) {
|
||||
activeTool = OHIF.viewer.defaultTool;
|
||||
}
|
||||
|
||||
configureTools();
|
||||
initialized = true;
|
||||
|
||||
@@ -121,10 +121,12 @@ Package.onUse(function (api) {
|
||||
api.addFiles('lib/enableHotkeys.js', 'client');
|
||||
api.addFiles('lib/viewportFunctions.js', 'client');
|
||||
api.addFiles('lib/WLPresets.js', 'client');
|
||||
|
||||
api.addFiles('lib/resizeViewportElements.js', 'client');
|
||||
api.addFiles('lib/encodeQueryData.js', 'server');
|
||||
|
||||
//api.export('accountsConfig', 'client');
|
||||
api.export('resizeViewportElements','client');
|
||||
api.export('handleResize','client');
|
||||
api.export('enableHotkeys', 'client');
|
||||
api.export('enablePrefetchOnElement', 'client');
|
||||
api.export('displayReferenceLines', 'client');
|
||||
|
||||
Reference in new issue
Block a user