lost-sia 1.1.3 → 1.2.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 +18 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6990,6 +6990,7 @@ function _inherits$g(subClass, superClass) { if (typeof superClass !== "function
|
|
|
6990
6990
|
* when no label was selected by the annotator. If not set "no label" will be used.
|
|
6991
6991
|
* If ID is used, it needs to be one of the possible label ids.
|
|
6992
6992
|
* @param {bool} blocked Block canvas view with loading dimmer.
|
|
6993
|
+
* @param {bool} preventScrolling Prevent scrolling on mouseEnter
|
|
6993
6994
|
* @param {int} nextAnnoId Id that will be used for the next annotation that
|
|
6994
6995
|
* will be created. If undefined, the canvas will create its own ids.
|
|
6995
6996
|
* @param {bool} lockedAnnos A list of AnnoIds of annos that should only be displayed.
|
|
@@ -7218,8 +7219,18 @@ var Canvas = function (_Component) {
|
|
|
7218
7219
|
}, {
|
|
7219
7220
|
key: 'onMouseOver',
|
|
7220
7221
|
value: function onMouseOver() {
|
|
7221
|
-
//Prevent scrolling on svg
|
|
7222
7222
|
this.svg.current.focus();
|
|
7223
|
+
//Prevent scrolling on svg
|
|
7224
|
+
if (this.props.preventScrolling) {
|
|
7225
|
+
document.body.style.overflow = 'hidden';
|
|
7226
|
+
}
|
|
7227
|
+
}
|
|
7228
|
+
}, {
|
|
7229
|
+
key: 'onMouseLeave',
|
|
7230
|
+
value: function onMouseLeave() {
|
|
7231
|
+
if (this.props.preventScrolling) {
|
|
7232
|
+
document.body.style.overflow = '';
|
|
7233
|
+
}
|
|
7223
7234
|
}
|
|
7224
7235
|
}, {
|
|
7225
7236
|
key: 'onWheel',
|
|
@@ -8649,6 +8660,9 @@ var Canvas = function (_Component) {
|
|
|
8649
8660
|
transform: 'scale(' + this.state.svg.scale + ') translate(' + this.state.svg.translateX + ', ' + this.state.svg.translateY + ')',
|
|
8650
8661
|
onMouseOver: function onMouseOver() {
|
|
8651
8662
|
_this10.onMouseOver();
|
|
8663
|
+
},
|
|
8664
|
+
onMouseLeave: function onMouseLeave() {
|
|
8665
|
+
_this10.onMouseLeave();
|
|
8652
8666
|
}
|
|
8653
8667
|
// onMouseEnter={() => this.svg.current.focus()}
|
|
8654
8668
|
, onMouseUp: function onMouseUp(e) {
|
|
@@ -9863,6 +9877,7 @@ var _slicedToArray$3 = function () { function sliceIterator(arr, i) { var _arr =
|
|
|
9863
9877
|
* when no label was selected by the annotator. If not set "no label" will be used.
|
|
9864
9878
|
* If ID is used, it needs to be one of the possible label ids.
|
|
9865
9879
|
* @param {bool} blocked Block canvas view with loading dimmer.
|
|
9880
|
+
* @param {bool} preventScrolling Prevent scrolling on mouseEnter
|
|
9866
9881
|
* @param {int} nextAnnoId Id that will be used for the next annotation that
|
|
9867
9882
|
* will be created. If undefined, the canvas will create its own ids.
|
|
9868
9883
|
* @param {bool} lockedAnnos A list of AnnoIds of annos that should only be displayed.
|
|
@@ -10163,7 +10178,8 @@ var Sia = function Sia(props) {
|
|
|
10163
10178
|
selectedTool: props.selectedTool,
|
|
10164
10179
|
isJunk: props.isJunk,
|
|
10165
10180
|
blocked: props.blockCanvas,
|
|
10166
|
-
defaultLabel: props.defaultLabel
|
|
10181
|
+
defaultLabel: props.defaultLabel,
|
|
10182
|
+
preventScrolling: props.preventScrolling
|
|
10167
10183
|
}),
|
|
10168
10184
|
React__default.createElement(ToolBar, {
|
|
10169
10185
|
onToolBarEvent: function onToolBarEvent(e, data) {
|