lost-sia 1.0.3 → 1.1.0
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.es.js +116 -24
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +116 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.1.0] - 2022-05-10
|
|
8
|
+
### Added
|
|
9
|
+
- More fine grained visibility level for toolbar elements
|
|
10
|
+
|
|
7
11
|
## [1.0.3] - 2022-05-10
|
|
8
12
|
### Fixed
|
|
9
13
|
- Export of toolbarEvents and tools
|
package/dist/index.es.js
CHANGED
|
@@ -8768,12 +8768,11 @@ var SIASettingButton = function (_Component) {
|
|
|
8768
8768
|
this.triggerEvent(EDIT_NODE_RADIUS, parseInt(e.target.value));
|
|
8769
8769
|
}
|
|
8770
8770
|
}, {
|
|
8771
|
-
key: '
|
|
8772
|
-
value: function
|
|
8771
|
+
key: 'renderInfoBoxContent',
|
|
8772
|
+
value: function renderInfoBoxContent() {
|
|
8773
8773
|
var _this2 = this;
|
|
8774
8774
|
|
|
8775
|
-
|
|
8776
|
-
var popupContent = React.createElement(
|
|
8775
|
+
return React.createElement(
|
|
8777
8776
|
'div',
|
|
8778
8777
|
null,
|
|
8779
8778
|
React.createElement(
|
|
@@ -8801,7 +8800,41 @@ var SIASettingButton = function (_Component) {
|
|
|
8801
8800
|
onClick: function onClick() {
|
|
8802
8801
|
return _this2.toggleAnnoStats();
|
|
8803
8802
|
}
|
|
8804
|
-
})
|
|
8803
|
+
})
|
|
8804
|
+
);
|
|
8805
|
+
}
|
|
8806
|
+
}, {
|
|
8807
|
+
key: 'renderInfoBoxes',
|
|
8808
|
+
value: function renderInfoBoxes() {
|
|
8809
|
+
if (!this.props.enabled) return null;
|
|
8810
|
+
if (this.props.enabled == true) {
|
|
8811
|
+
return this.renderInfoBoxContent();
|
|
8812
|
+
} else {
|
|
8813
|
+
if (this.props.enabled.infoBoxes) {
|
|
8814
|
+
return this.renderInfoBoxContent();
|
|
8815
|
+
}
|
|
8816
|
+
}
|
|
8817
|
+
}
|
|
8818
|
+
}, {
|
|
8819
|
+
key: 'renderAnnoStyle',
|
|
8820
|
+
value: function renderAnnoStyle() {
|
|
8821
|
+
if (!this.props.enabled) return null;
|
|
8822
|
+
if (this.props.enabled == true) {
|
|
8823
|
+
return this.renderAnnoStyleContent();
|
|
8824
|
+
} else {
|
|
8825
|
+
if (this.props.enabled.annoStyle) {
|
|
8826
|
+
return this.renderAnnoStyleContent();
|
|
8827
|
+
}
|
|
8828
|
+
}
|
|
8829
|
+
}
|
|
8830
|
+
}, {
|
|
8831
|
+
key: 'renderAnnoStyleContent',
|
|
8832
|
+
value: function renderAnnoStyleContent() {
|
|
8833
|
+
var _this3 = this;
|
|
8834
|
+
|
|
8835
|
+
return React.createElement(
|
|
8836
|
+
'div',
|
|
8837
|
+
null,
|
|
8805
8838
|
React.createElement(
|
|
8806
8839
|
Divider,
|
|
8807
8840
|
{ horizontal: true },
|
|
@@ -8819,7 +8852,7 @@ var SIASettingButton = function (_Component) {
|
|
|
8819
8852
|
max: 10,
|
|
8820
8853
|
value: this.props.uiConfig.strokeWidth,
|
|
8821
8854
|
onChange: function onChange(e) {
|
|
8822
|
-
return
|
|
8855
|
+
return _this3.handleStrokeWidthChange(e);
|
|
8823
8856
|
}
|
|
8824
8857
|
}),
|
|
8825
8858
|
React.createElement(
|
|
@@ -8834,10 +8867,22 @@ var SIASettingButton = function (_Component) {
|
|
|
8834
8867
|
max: 10,
|
|
8835
8868
|
value: this.props.uiConfig.nodeRadius,
|
|
8836
8869
|
onChange: function onChange(e) {
|
|
8837
|
-
return
|
|
8870
|
+
return _this3.handleNodeRadiusChange(e);
|
|
8838
8871
|
}
|
|
8839
8872
|
})
|
|
8840
8873
|
);
|
|
8874
|
+
}
|
|
8875
|
+
}, {
|
|
8876
|
+
key: 'render',
|
|
8877
|
+
value: function render() {
|
|
8878
|
+
|
|
8879
|
+
if (!this.props.uiConfig) return null;
|
|
8880
|
+
var popupContent = React.createElement(
|
|
8881
|
+
'div',
|
|
8882
|
+
null,
|
|
8883
|
+
this.renderInfoBoxes(),
|
|
8884
|
+
this.renderAnnoStyle()
|
|
8885
|
+
);
|
|
8841
8886
|
return React.createElement(Popup, { trigger: React.createElement(
|
|
8842
8887
|
Menu.Item,
|
|
8843
8888
|
{ name: 'setting' },
|
|
@@ -8962,13 +9007,12 @@ var SIAFilterButton = function (_Component) {
|
|
|
8962
9007
|
// })
|
|
8963
9008
|
}
|
|
8964
9009
|
}, {
|
|
8965
|
-
key: '
|
|
8966
|
-
value: function
|
|
9010
|
+
key: 'renderRotateContent',
|
|
9011
|
+
value: function renderRotateContent() {
|
|
8967
9012
|
var _this2 = this;
|
|
8968
9013
|
|
|
8969
9014
|
var filter = this.props.filter;
|
|
8970
|
-
|
|
8971
|
-
var popupContent = React.createElement(
|
|
9015
|
+
return React.createElement(
|
|
8972
9016
|
'div',
|
|
8973
9017
|
null,
|
|
8974
9018
|
React.createElement(
|
|
@@ -8996,7 +9040,30 @@ var SIAFilterButton = function (_Component) {
|
|
|
8996
9040
|
onClick: function onClick() {
|
|
8997
9041
|
return _this2.rotateImg(180);
|
|
8998
9042
|
}
|
|
8999
|
-
})
|
|
9043
|
+
})
|
|
9044
|
+
);
|
|
9045
|
+
}
|
|
9046
|
+
}, {
|
|
9047
|
+
key: 'renderRotate',
|
|
9048
|
+
value: function renderRotate() {
|
|
9049
|
+
if (!this.props.enabled) return null;
|
|
9050
|
+
if (this.props.enabled === true) {
|
|
9051
|
+
return this.renderRotateContent();
|
|
9052
|
+
} else {
|
|
9053
|
+
if (this.props.enabled.rotate) {
|
|
9054
|
+
return this.renderRotateContent();
|
|
9055
|
+
}
|
|
9056
|
+
}
|
|
9057
|
+
}
|
|
9058
|
+
}, {
|
|
9059
|
+
key: 'renderClaheContent',
|
|
9060
|
+
value: function renderClaheContent() {
|
|
9061
|
+
var _this3 = this;
|
|
9062
|
+
|
|
9063
|
+
var filter = this.props.filter;
|
|
9064
|
+
return React.createElement(
|
|
9065
|
+
'div',
|
|
9066
|
+
null,
|
|
9000
9067
|
React.createElement(
|
|
9001
9068
|
Divider,
|
|
9002
9069
|
{ horizontal: true },
|
|
@@ -9006,7 +9073,7 @@ var SIAFilterButton = function (_Component) {
|
|
|
9006
9073
|
checked: filter.clahe.active,
|
|
9007
9074
|
label: 'Histogram equalization', toggle: true,
|
|
9008
9075
|
onClick: function onClick() {
|
|
9009
|
-
return
|
|
9076
|
+
return _this3.claheFilter(_this3.state.clipLimit);
|
|
9010
9077
|
}
|
|
9011
9078
|
}),
|
|
9012
9079
|
React.createElement(
|
|
@@ -9021,13 +9088,36 @@ var SIAFilterButton = function (_Component) {
|
|
|
9021
9088
|
max: 40,
|
|
9022
9089
|
value: this.state.clipLimit,
|
|
9023
9090
|
onChange: function onChange(e) {
|
|
9024
|
-
return
|
|
9091
|
+
return _this3.handleClipLimitChange(e);
|
|
9025
9092
|
},
|
|
9026
9093
|
onMouseUp: function onMouseUp(e) {
|
|
9027
|
-
return
|
|
9094
|
+
return _this3.releaseCLAHESlider(e);
|
|
9028
9095
|
}
|
|
9029
9096
|
})
|
|
9030
9097
|
);
|
|
9098
|
+
}
|
|
9099
|
+
}, {
|
|
9100
|
+
key: 'renderClahe',
|
|
9101
|
+
value: function renderClahe() {
|
|
9102
|
+
if (!this.props.enabled) return null;
|
|
9103
|
+
if (this.props.enabled === true) {
|
|
9104
|
+
return this.renderClaheContent();
|
|
9105
|
+
} else {
|
|
9106
|
+
if (this.props.enabled.clahe) {
|
|
9107
|
+
return this.renderClaheContent();
|
|
9108
|
+
}
|
|
9109
|
+
}
|
|
9110
|
+
}
|
|
9111
|
+
}, {
|
|
9112
|
+
key: 'render',
|
|
9113
|
+
value: function render() {
|
|
9114
|
+
if (!this.props.imageMeta) return null;
|
|
9115
|
+
var popupContent = React.createElement(
|
|
9116
|
+
'div',
|
|
9117
|
+
null,
|
|
9118
|
+
this.renderRotate(),
|
|
9119
|
+
this.renderClahe()
|
|
9120
|
+
);
|
|
9031
9121
|
return React.createElement(Popup, { trigger: React.createElement(
|
|
9032
9122
|
Menu.Item,
|
|
9033
9123
|
{ name: 'filter', active: this.state.active },
|
|
@@ -9605,6 +9695,7 @@ var ToolBar = function (_Component) {
|
|
|
9605
9695
|
|
|
9606
9696
|
if (!this.props.enabled.settings) return null;
|
|
9607
9697
|
return React.createElement(SIASettingButton, {
|
|
9698
|
+
enabled: this.props.enabled.settings,
|
|
9608
9699
|
uiConfig: this.props.uiConfig,
|
|
9609
9700
|
onSettingEvent: function onSettingEvent(e, data) {
|
|
9610
9701
|
return _this11.triggerToolBarEvent(e, data);
|
|
@@ -9617,6 +9708,7 @@ var ToolBar = function (_Component) {
|
|
|
9617
9708
|
|
|
9618
9709
|
if (!this.props.enabled.filter) return null;
|
|
9619
9710
|
return React.createElement(SIAFilterButton, {
|
|
9711
|
+
enabled: this.props.enabled.filter,
|
|
9620
9712
|
onFilterEvent: function onFilterEvent(e, data) {
|
|
9621
9713
|
return _this12.triggerToolBarEvent(e, data);
|
|
9622
9714
|
},
|
|
@@ -9777,15 +9869,15 @@ var _slicedToArray$3 = function () { function sliceIterator(arr, i) { var _arr =
|
|
|
9777
9869
|
* @param {bool | object} toolbarEnabled Defines which toolbar buttons are
|
|
9778
9870
|
* displayed or if toolbar is shown at all.
|
|
9779
9871
|
* false | {
|
|
9780
|
-
* imgLabel:
|
|
9781
|
-
* nextPrev:
|
|
9782
|
-
* toolSelection:
|
|
9783
|
-
* fullscreen:
|
|
9784
|
-
* junk:
|
|
9785
|
-
* deleteAll:
|
|
9786
|
-
* settings:
|
|
9787
|
-
* filter:
|
|
9788
|
-
* help:
|
|
9872
|
+
* imgLabel: bool,
|
|
9873
|
+
* nextPrev: bool,
|
|
9874
|
+
* toolSelection: bool,
|
|
9875
|
+
* fullscreen: bool,
|
|
9876
|
+
* junk: bool,
|
|
9877
|
+
* deleteAll: bool,
|
|
9878
|
+
* settings: bool | {infoBoxes: bool, annoStyle: bool},
|
|
9879
|
+
* filter: bool | {rotate: bool, clahe:bool},
|
|
9880
|
+
* help: bool
|
|
9789
9881
|
* }
|
|
9790
9882
|
* @event onNotification - Callback for Notification messages
|
|
9791
9883
|
* args: {title: str, message: str, type: str}
|