@cloud-app-dev/vidc 3.0.39 → 3.0.40
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/es/ROI/index.d.ts +1 -1
- package/es/ROI/index.js +3 -2
- package/es/useDrawROI/index.d.ts +2 -0
- package/es/useDrawROI/index.js +15 -1
- package/package.json +1 -1
package/es/ROI/index.d.ts
CHANGED
package/es/ROI/index.js
CHANGED
|
@@ -20,7 +20,8 @@ function RIO(_ref) {
|
|
|
20
20
|
open = _useDrawROI.open,
|
|
21
21
|
close = _useDrawROI.close,
|
|
22
22
|
clear = _useDrawROI.clear,
|
|
23
|
-
rio = _useDrawROI.rio
|
|
23
|
+
rio = _useDrawROI.rio,
|
|
24
|
+
areas = _useDrawROI.areas; // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
useEffect(function () {
|
|
@@ -32,7 +33,7 @@ function RIO(_ref) {
|
|
|
32
33
|
}, [renderKey]);
|
|
33
34
|
|
|
34
35
|
_useUpdateEffect(function () {
|
|
35
|
-
return onChange === null || onChange === void 0 ? void 0 : onChange(rio);
|
|
36
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(rio, areas);
|
|
36
37
|
}, [rio]);
|
|
37
38
|
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
package/es/useDrawROI/index.d.ts
CHANGED
package/es/useDrawROI/index.js
CHANGED
|
@@ -310,12 +310,26 @@ function useDrawROI(target, _ref) {
|
|
|
310
310
|
|
|
311
311
|
return rioArr;
|
|
312
312
|
}, [row, rowItems, state.saveArea, target]);
|
|
313
|
+
|
|
314
|
+
var deleteArea = function deleteArea(area) {
|
|
315
|
+
setState(function (old) {
|
|
316
|
+
var newArea = old.saveArea.filter(function (v) {
|
|
317
|
+
return v.join('-') !== area.join('-');
|
|
318
|
+
});
|
|
319
|
+
return Object.assign(Object.assign({}, old), {
|
|
320
|
+
saveArea: _toConsumableArray(newArea)
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
|
|
313
325
|
return {
|
|
314
326
|
open: open,
|
|
315
327
|
close: close,
|
|
316
328
|
clear: clear,
|
|
317
329
|
rio: rio,
|
|
318
|
-
status: status
|
|
330
|
+
status: status,
|
|
331
|
+
areas: state.saveArea,
|
|
332
|
+
deleteArea: deleteArea
|
|
319
333
|
};
|
|
320
334
|
}
|
|
321
335
|
|