fix(demo): Deploy issue (#3951)
This commit is contained in:
1 parent
2a442e30eb
commit
21e8a2bd0b
20 files changed
+235
-104
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.44.1",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.63.4",
|
||||
"@ohif/core": "3.8.0-beta.55",
|
||||
"@ohif/ui": "3.8.0-beta.55",
|
||||
"dcmjs": "^0.29.12",
|
||||
@@ -54,11 +54,11 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^1.44.1",
|
||||
"@cornerstonejs/core": "^1.44.1",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.44.1",
|
||||
"@cornerstonejs/tools": "^1.44.1",
|
||||
"@kitware/vtk.js": "29.3.01",
|
||||
"@cornerstonejs/adapters": "^1.63.4",
|
||||
"@cornerstonejs/core": "^1.63.4",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^1.63.4",
|
||||
"@cornerstonejs/tools": "^1.63.4",
|
||||
"@kitware/vtk.js": "29.7.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "4.0.8",
|
||||
"lodash.merge": "^4.6.2",
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { log, Types } from '@ohif/core';
|
||||
import { log, Enums } from '@ohif/core';
|
||||
import { EVENTS } from '@cornerstonejs/core';
|
||||
|
||||
const { TimingEnum } = Types;
|
||||
|
||||
const IMAGE_TIMING_KEYS = [
|
||||
TimingEnum.DISPLAY_SETS_TO_ALL_IMAGES,
|
||||
TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE,
|
||||
TimingEnum.STUDY_TO_FIRST_IMAGE,
|
||||
];
|
||||
const IMAGE_TIMING_KEYS = [];
|
||||
|
||||
const imageTiming = {
|
||||
viewportsWaiting: 0,
|
||||
@@ -23,6 +17,18 @@ const imageTiming = {
|
||||
*/
|
||||
|
||||
export default function initViewTiming({ element }) {
|
||||
if (!IMAGE_TIMING_KEYS.length) {
|
||||
// Work around a bug in WebPack that doesn't getting the enums initialized
|
||||
// quite fast enough to be declared statically.
|
||||
const { TimingEnum } = Enums;
|
||||
|
||||
IMAGE_TIMING_KEYS.push(
|
||||
TimingEnum.DISPLAY_SETS_TO_ALL_IMAGES,
|
||||
TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE,
|
||||
TimingEnum.STUDY_TO_FIRST_IMAGE,
|
||||
);
|
||||
}
|
||||
|
||||
if (!IMAGE_TIMING_KEYS.find(key => log.timingKeys[key])) {
|
||||
return;
|
||||
}
|
||||
@@ -34,6 +40,7 @@ function imageRenderedListener(evt) {
|
||||
if (evt.detail.viewportStatus === 'preRender') {
|
||||
return;
|
||||
}
|
||||
const { TimingEnum } = Enums;
|
||||
log.timeEnd(TimingEnum.DISPLAY_SETS_TO_FIRST_IMAGE);
|
||||
log.timeEnd(TimingEnum.STUDY_TO_FIRST_IMAGE);
|
||||
log.timeEnd(TimingEnum.SCRIPT_TO_VIEW);
|
||||
|
||||
Reference in new issue
Block a user