hellfire 0.25.9 → 0.25.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.js +64 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.25.10](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.9...v0.25.10) (2023-03-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
## [0.25.9](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.8...v0.25.9) (2023-03-07)
|
|
6
10
|
|
|
7
11
|
|
package/dist/index.js
CHANGED
|
@@ -28526,7 +28526,8 @@ var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoa
|
|
|
28526
28526
|
};
|
|
28527
28527
|
var EVENTS$3 = {
|
|
28528
28528
|
RELATIVE_SYNC: 'cornerstonetoolsrelativesync',
|
|
28529
|
-
SELECT_POSITION: 'cornerstonetoolsselectposition'
|
|
28529
|
+
SELECT_POSITION: 'cornerstonetoolsselectposition',
|
|
28530
|
+
EVENT_DOM_RE_RENDER: 'cornerstone_dom_error_re_render'
|
|
28530
28531
|
};
|
|
28531
28532
|
function setViewportWithEvent(element, viewport, activeTool, changeData, originViewport) {
|
|
28532
28533
|
cornerstone.setViewport(element, viewport);
|
|
@@ -51577,7 +51578,7 @@ var SvgRefresh$1 = function SvgRefresh(props) {
|
|
|
51577
51578
|
}, props), _ref$1c);
|
|
51578
51579
|
};
|
|
51579
51580
|
|
|
51580
|
-
var css_248z$m = ".loadingIndicator {\n position: absolute;\n top: 0;\n background: black;\n opacity: 1;\n width: 100%;\n height: 100%;\n text-align: center;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.loadingIndicator .lds-ring {\n color: #999;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 40px;\n height: 40px;\n margin: auto;\n}\n.loadingIndicator .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 40px;\n height: 40px;\n border: 4px solid silver;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: silver transparent transparent transparent;\n}\n.loadingIndicator .lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loadingIndicator .lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loadingIndicator .lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.loadingIndicator .loadingIndicator-retry {\n width: 40px;\n color: #999;\n margin: 0 auto;\n font-size: 14px;\n}\n.loadingIndicator .indicatorContents h4 {\n font-size: 18px;\n margin: 0 auto 10px 0;\n}\n.loadingIndicator .indicatorContents p {\n margin: 4px auto;\n color: #999;\n font-size: 14px;\n}\n.loadingIndicator .indicatorContents .loadingIndicator-retry {\n width: 40px;\n margin: 20px auto 0 auto;\n}\n.loadingIndicator .indicatorContents-mini h4 {\n color: #fff;\n font-size: 12px;\n margin: 5px 0 5px 0;\n}\n.loadingIndicator .indicatorContents-mini .loadingIndicator-retry {\n width: 20px;\n font-size: 12px;\n}\n";
|
|
51581
|
+
var css_248z$m = ".loadingIndicator {\n position: absolute;\n top: 0;\n background: black;\n opacity: 1;\n width: 100%;\n height: 100%;\n text-align: center;\n z-index: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.loadingIndicator .lds-ring {\n color: #999;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 40px;\n height: 40px;\n margin: auto;\n}\n.loadingIndicator .lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n width: 40px;\n height: 40px;\n border: 4px solid silver;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: silver transparent transparent transparent;\n}\n.loadingIndicator .lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n.loadingIndicator .lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n.loadingIndicator .lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.loadingIndicator .loadingIndicator-retry {\n width: 40px;\n color: #999;\n margin: 0 auto;\n font-size: 14px;\n}\n.loadingIndicator .indicatorContents h4 {\n font-size: 18px;\n margin: 0 auto 10px 0;\n}\n.loadingIndicator .indicatorContents h5 {\n font-size: 16px;\n margin: 0 auto 10px 0;\n}\n.loadingIndicator .indicatorContents p {\n margin: 4px auto;\n color: #999;\n font-size: 14px;\n}\n.loadingIndicator .indicatorContents .loadingIndicator-retry {\n width: 40px;\n margin: 20px auto 0 auto;\n}\n.loadingIndicator .indicatorContents-mini h4 {\n color: #fff;\n font-size: 12px;\n margin: 5px 0 5px 0;\n}\n.loadingIndicator .indicatorContents-mini .loadingIndicator-retry {\n width: 20px;\n font-size: 12px;\n}\n";
|
|
51581
51582
|
styleInject$1(css_248z$m);
|
|
51582
51583
|
|
|
51583
51584
|
(function () {
|
|
@@ -51610,7 +51611,8 @@ var LoadingIndicator = /*#__PURE__*/function (_PureComponent) {
|
|
|
51610
51611
|
var _this$props = this.props,
|
|
51611
51612
|
mini = _this$props.mini,
|
|
51612
51613
|
error = _this$props.error,
|
|
51613
|
-
handleRetry = _this$props.handleRetry
|
|
51614
|
+
handleRetry = _this$props.handleRetry,
|
|
51615
|
+
domError = _this$props.domError;
|
|
51614
51616
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
51615
51617
|
className: "loadingIndicator"
|
|
51616
51618
|
}, error ? mini ? /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -51621,6 +51623,14 @@ var LoadingIndicator = /*#__PURE__*/function (_PureComponent) {
|
|
|
51621
51623
|
}
|
|
51622
51624
|
}, /*#__PURE__*/React__default.createElement("h4", null, "\u52A0\u8F7D\u5931\u8D25"), /*#__PURE__*/React__default.createElement("div", {
|
|
51623
51625
|
className: "loadingIndicator-retry"
|
|
51626
|
+
}, /*#__PURE__*/React__default.createElement(SvgRefresh$1, null))) : domError ? /*#__PURE__*/React__default.createElement("div", {
|
|
51627
|
+
className: "indicatorContents"
|
|
51628
|
+
}, /*#__PURE__*/React__default.createElement("h5", null, "\u5F71\u50CF\u6E32\u67D3\u5931\u8D25\uFF0C\u8BF7\u70B9\u51FB\u91CD\u8BD5"), /*#__PURE__*/React__default.createElement("div", {
|
|
51629
|
+
className: "loadingIndicator-retry",
|
|
51630
|
+
onClick: function onClick(e) {
|
|
51631
|
+
e.stopPropagation();
|
|
51632
|
+
handleRetry(e);
|
|
51633
|
+
}
|
|
51624
51634
|
}, /*#__PURE__*/React__default.createElement(SvgRefresh$1, null))) : /*#__PURE__*/React__default.createElement("div", {
|
|
51625
51635
|
className: "indicatorContents"
|
|
51626
51636
|
}, /*#__PURE__*/React__default.createElement("h4", null, "\u52A0\u8F7D\u5F71\u50CF\u5931\u8D25"), /*#__PURE__*/React__default.createElement("p", {
|
|
@@ -51650,6 +51660,7 @@ var LoadingIndicator = /*#__PURE__*/function (_PureComponent) {
|
|
|
51650
51660
|
}(React.PureComponent);
|
|
51651
51661
|
|
|
51652
51662
|
defineProperty(LoadingIndicator, "propTypes", {
|
|
51663
|
+
domError: PropTypes$1.bool,
|
|
51653
51664
|
error: PropTypes$1.object,
|
|
51654
51665
|
mini: PropTypes$1.bool,
|
|
51655
51666
|
handleRetry: PropTypes$1.func
|
|
@@ -54674,6 +54685,9 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54674
54685
|
stack: _stack,
|
|
54675
54686
|
viewport: cornerstone.getDefaultViewport(null, undefined),
|
|
54676
54687
|
error: null,
|
|
54688
|
+
// 影像数据加载error
|
|
54689
|
+
domError: false,
|
|
54690
|
+
// 容器渲染error
|
|
54677
54691
|
sliceThickness: 1,
|
|
54678
54692
|
//mpr模式的层厚倍数
|
|
54679
54693
|
forceRender: false,
|
|
@@ -54688,6 +54702,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54688
54702
|
_this.onMPRProcessed = _this.onMPRProcessed.bind(assertThisInitialized(_this));
|
|
54689
54703
|
_this.onWindowResize = _this.onWindowResize.bind(assertThisInitialized(_this));
|
|
54690
54704
|
_this.onMouseWheel = _this.onMouseWheel.bind(assertThisInitialized(_this));
|
|
54705
|
+
_this.onDomErrorReRender = _this.onDomErrorReRender.bind(assertThisInitialized(_this));
|
|
54691
54706
|
_this.debouncedResize = lodash$1.debounce(_this.resize, 300);
|
|
54692
54707
|
_this.availableTools = _this.mergeToolConfig(); // 滚动条上的标记
|
|
54693
54708
|
// 1.ai标记 序列模式下
|
|
@@ -54716,7 +54731,8 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54716
54731
|
error = _this$state.error,
|
|
54717
54732
|
aiTipInCustomScroll = _this$state.aiTipInCustomScroll,
|
|
54718
54733
|
centesisTipInCustomScroll = _this$state.centesisTipInCustomScroll,
|
|
54719
|
-
stack = _this$state.stack
|
|
54734
|
+
stack = _this$state.stack,
|
|
54735
|
+
domError = _this$state.domError;
|
|
54720
54736
|
var _this$props4 = this.props,
|
|
54721
54737
|
showCustomScroll = _this$props4.showCustomScroll,
|
|
54722
54738
|
mpr = _this$props4.mpr,
|
|
@@ -54733,12 +54749,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54733
54749
|
Surgery = _this$props4.Surgery,
|
|
54734
54750
|
directionToggle = _this$props4.directionToggle,
|
|
54735
54751
|
direction = _this$props4.direction,
|
|
54736
|
-
CPR = _this$props4.CPR
|
|
54752
|
+
CPR = _this$props4.CPR,
|
|
54753
|
+
onClickDomErrorReRenderButton = _this$props4.onClickDomErrorReRenderButton;
|
|
54737
54754
|
var active = activeIndex === index;
|
|
54738
54755
|
|
|
54739
54756
|
var linked = lodash$1.includes(linkedIndexArr, index);
|
|
54740
54757
|
|
|
54741
|
-
var displayLoadingIndicator = isLoading || error;
|
|
54758
|
+
var displayLoadingIndicator = isLoading || error || domError;
|
|
54742
54759
|
var imageCount = stack && stack.imageIds.length || 0;
|
|
54743
54760
|
var currentImageIndex = stack && stack.currentImageIdIndex || 0;
|
|
54744
54761
|
var imageId = stack && stack.imageIds[currentImageIndex]; // thickness process type
|
|
@@ -54764,7 +54781,16 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54764
54781
|
}
|
|
54765
54782
|
}, displayLoadingIndicator && /*#__PURE__*/React__default.createElement(_default$13, {
|
|
54766
54783
|
error: error,
|
|
54767
|
-
|
|
54784
|
+
domError: domError,
|
|
54785
|
+
handleRetry: function handleRetry(ev) {
|
|
54786
|
+
if (domError) {
|
|
54787
|
+
_this3.componentDidMount();
|
|
54788
|
+
|
|
54789
|
+
onClickDomErrorReRenderButton && onClickDomErrorReRenderButton();
|
|
54790
|
+
} else {
|
|
54791
|
+
_this3.loadImage(ev);
|
|
54792
|
+
}
|
|
54793
|
+
}
|
|
54768
54794
|
}), /*#__PURE__*/React__default.createElement("canvas", {
|
|
54769
54795
|
className: "cornerstone-canvas"
|
|
54770
54796
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -55194,6 +55220,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
55194
55220
|
|
|
55195
55221
|
return scale;
|
|
55196
55222
|
}
|
|
55223
|
+
}, {
|
|
55224
|
+
key: "onDomErrorReRender",
|
|
55225
|
+
value: function onDomErrorReRender() {
|
|
55226
|
+
if (this.state.domError) {
|
|
55227
|
+
this.componentDidMount();
|
|
55228
|
+
}
|
|
55229
|
+
}
|
|
55197
55230
|
}, {
|
|
55198
55231
|
key: "addEventListener",
|
|
55199
55232
|
value: function addEventListener() {
|
|
@@ -55230,6 +55263,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
55230
55263
|
this.element.removeEventListener(cornerstone.EVENTS.IMAGE_RENDERED, this.onImageRendered);
|
|
55231
55264
|
this.element.removeEventListener(cornerstone.EVENTS.NEW_IMAGE, this.onNewImage);
|
|
55232
55265
|
window.removeEventListener(EVENT_RESIZE, this.onWindowResize);
|
|
55266
|
+
_default$f.removeListener(EVENTS$3.EVENT_DOM_RE_RENDER, this.onDomErrorReRender);
|
|
55233
55267
|
this.element.removeEventListener('mousedown', this.onMouseDown);
|
|
55234
55268
|
|
|
55235
55269
|
if (this.props.onMouseWheel) {
|
|
@@ -55242,6 +55276,23 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
55242
55276
|
this.element = document.getElementById("paladin-viewport-".concat(this.props.index));
|
|
55243
55277
|
var element = this.element; // Enable the DOM Element for use with Cornerstone
|
|
55244
55278
|
|
|
55279
|
+
if (element.offsetWidth === 0) {
|
|
55280
|
+
this.setState({
|
|
55281
|
+
error: {
|
|
55282
|
+
message: '影像窗口获取失败,请重试'
|
|
55283
|
+
},
|
|
55284
|
+
domError: true
|
|
55285
|
+
});
|
|
55286
|
+
_default$f.addListener(EVENTS$3.EVENT_DOM_RE_RENDER, this.onDomErrorReRender);
|
|
55287
|
+
return;
|
|
55288
|
+
} else {
|
|
55289
|
+
_default$f.removeListener(EVENTS$3.EVENT_DOM_RE_RENDER, this.onDomErrorReRender);
|
|
55290
|
+
this.setState({
|
|
55291
|
+
error: null,
|
|
55292
|
+
domError: false
|
|
55293
|
+
});
|
|
55294
|
+
}
|
|
55295
|
+
|
|
55245
55296
|
cornerstone.enable(element, {}); //先监听事件集合
|
|
55246
55297
|
|
|
55247
55298
|
this.addEventListener(); // 初始化工具
|
|
@@ -56018,7 +56069,8 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
|
|
|
56018
56069
|
onCustomScroll: _this2.onCustomScroll,
|
|
56019
56070
|
onDrop: _this2.props.onDrop,
|
|
56020
56071
|
showAIResult: _this2.props.showAIResult,
|
|
56021
|
-
onResizeEmit: _this2.props.onResizeEmit
|
|
56072
|
+
onResizeEmit: _this2.props.onResizeEmit,
|
|
56073
|
+
onClickDomErrorReRenderButton: _this2.props.onClickDomErrorReRenderButton
|
|
56022
56074
|
});
|
|
56023
56075
|
}));
|
|
56024
56076
|
})), showVerticalScroll && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -56422,6 +56474,10 @@ var mergeProps$h = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
56422
56474
|
if (propsFromState.activeIndex === i) {
|
|
56423
56475
|
propsFromDispatch.setCurrentSeries(dragSeries);
|
|
56424
56476
|
}
|
|
56477
|
+
},
|
|
56478
|
+
onClickDomErrorReRenderButton: function onClickDomErrorReRenderButton() {
|
|
56479
|
+
// dom没有准备好就enable element导致canvas大小为0,一个影像重试按钮操作后需要通知所有element自我检测是否需要re render
|
|
56480
|
+
_default$f.emit(EVENTS$3.EVENT_DOM_RE_RENDER);
|
|
56425
56481
|
}
|
|
56426
56482
|
});
|
|
56427
56483
|
};
|