@searpent/react-image-annotate 2.3.4 → 2.3.6

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.
Files changed (60) hide show
  1. package/Annotator/examplePhotos.js +28 -28
  2. package/Annotator/examplePhotos_repr.js +28 -28
  3. package/Annotator/index.js +40 -31
  4. package/Annotator/index.story_bugdemo_15_1.js +895 -773
  5. package/Annotator/index.story_repr.js +1048 -933
  6. package/Annotator/reducers/convert-expanding-line-to-polygon.js +15 -16
  7. package/ClassSelectionMenu/index.js +55 -35
  8. package/Crosshairs/index.js +30 -23
  9. package/DebugSidebarBox/index.js +40 -9
  10. package/DemoSite/Editor.js +124 -79
  11. package/DemoSite/ErrorBoundaryDialog.js +19 -6
  12. package/DemoSite/index.js +26 -17
  13. package/Editor/index.js +70 -36
  14. package/Editor/index_bugdemo_15_1.js +68 -35
  15. package/Editor/readOnly.js +178 -127
  16. package/Errorer/index.js +8 -3
  17. package/FullImageSegmentationAnnotator/index.js +6 -3
  18. package/GroupSelectorSidebarBox/index.js +48 -32
  19. package/GroupsEditorSidebarBox/index.js +75 -40
  20. package/HelpSidebarBox/index.js +24 -13
  21. package/HighlightBox/index.js +37 -30
  22. package/HistorySidebarBox/index.js +51 -29
  23. package/ImageCanvas/index.js +165 -130
  24. package/ImageMask/index.js +9 -6
  25. package/ImageSelectorSidebarBox/index.js +44 -26
  26. package/KeyframeTimeline/index.js +65 -45
  27. package/KeyframesSelectorSidebarBox/index.js +76 -54
  28. package/LandingPage/index.js +76 -38
  29. package/Locker/index.js +8 -3
  30. package/MainLayout/RightSidebarItemsWrapper.js +7 -4
  31. package/MainLayout/icon-dictionary.js +99 -66
  32. package/MainLayout/index.js +258 -196
  33. package/MainLayout/index_bugdemo_15_1.js +253 -195
  34. package/MetadataEditorSidebarBox/index.js +152 -102
  35. package/MetadataEditorSidebarBox/index_14_01_25.js +152 -102
  36. package/MetadataEditorSidebarBox/index_repr.js +183 -128
  37. package/PageSelector/UpdatedBySemaphore.js +95 -0
  38. package/PageSelector/index.js +181 -97
  39. package/PageSelector/page-selector.css +118 -2
  40. package/PointDistances/index.js +45 -33
  41. package/PreventScrollToParents/index.js +16 -9
  42. package/RegionLabel/index.js +217 -165
  43. package/RegionSelectAndTransformBoxes/index.js +131 -105
  44. package/RegionSelectorSidebarBox/index.js +243 -165
  45. package/RegionShapes/index.js +213 -153
  46. package/RegionTags/index.js +83 -69
  47. package/SettingsDialog/index.js +50 -37
  48. package/SettingsProvider/index.js +8 -5
  49. package/Shortcuts/ShortcutField.js +21 -14
  50. package/Shortcuts/index.js +18 -12
  51. package/ShortcutsManager/index.js +7 -4
  52. package/Sidebar/index.js +46 -29
  53. package/SidebarBoxContainer/index.js +14 -7
  54. package/SmallToolButton/index.js +23 -16
  55. package/TagsSidebarBox/index.js +41 -28
  56. package/TaskDescriptionSidebarBox/index.js +24 -13
  57. package/Theme/index.js +8 -3
  58. package/VideoOrImageCanvasBackground/index.js +30 -17
  59. package/package.json +1 -1
  60. package/utils/spellcheck-nspell.js +2 -2
@@ -12,30 +12,40 @@ var RegionComponents = {
12
12
  var region = _ref.region,
13
13
  iw = _ref.iw,
14
14
  ih = _ref.ih;
15
- return React.createElement("g", {
16
- transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
17
- }, React.createElement("path", {
18
- d: "M0 8L8 0L0 -8L-8 0Z",
19
- strokeWidth: 2,
20
- stroke: region.color,
21
- fill: "transparent"
22
- }));
15
+ return (
16
+ /*#__PURE__*/
17
+ React.createElement("g", {
18
+ transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
19
+ },
20
+ /*#__PURE__*/
21
+ React.createElement("path", {
22
+ d: "M0 8L8 0L0 -8L-8 0Z",
23
+ strokeWidth: 2,
24
+ stroke: region.color,
25
+ fill: "transparent"
26
+ }))
27
+ );
23
28
  }),
24
29
  line: memo(function (_ref2) {
25
30
  var region = _ref2.region,
26
31
  iw = _ref2.iw,
27
32
  ih = _ref2.ih;
28
- return React.createElement("g", {
29
- transform: "translate(".concat(region.x1 * iw, " ").concat(region.y1 * ih, ")")
30
- }, React.createElement("line", {
31
- strokeWidth: 2,
32
- x1: 0,
33
- y1: 0,
34
- x2: (region.x2 - region.x1) * iw,
35
- y2: (region.y2 - region.y1) * ih,
36
- stroke: colorAlpha(region.color, 0.75),
37
- fill: colorAlpha(region.color, 0.25)
38
- }));
33
+ return (
34
+ /*#__PURE__*/
35
+ React.createElement("g", {
36
+ transform: "translate(".concat(region.x1 * iw, " ").concat(region.y1 * ih, ")")
37
+ },
38
+ /*#__PURE__*/
39
+ React.createElement("line", {
40
+ strokeWidth: 2,
41
+ x1: 0,
42
+ y1: 0,
43
+ x2: (region.x2 - region.x1) * iw,
44
+ y2: (region.y2 - region.y1) * ih,
45
+ stroke: colorAlpha(region.color, 0.75),
46
+ fill: colorAlpha(region.color, 0.25)
47
+ }))
48
+ );
39
49
  }),
40
50
  box: memo(function (_ref3) {
41
51
  var region = _ref3.region,
@@ -47,29 +57,39 @@ var RegionComponents = {
47
57
  groupColor = _useColors.groupColor;
48
58
 
49
59
  if (region.groupId !== undefined) {
50
- return React.createElement("g", {
51
- transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
52
- }, React.createElement("rect", {
53
- strokeWidth: region.groupHighlighted ? 3 : 0,
54
- x: 0,
55
- y: 0,
56
- width: Math.max(region.w * iw, 0),
57
- height: Math.max(region.h * ih, 0),
58
- stroke: colorAlpha(clsColor(region.cls), 0.85),
59
- fill: region.groupHighlighted ? colorAlpha(clsColor(region.cls), 0.15) : colorAlpha(groupColor(region.groupId), 0.5)
60
- }));
60
+ return (
61
+ /*#__PURE__*/
62
+ React.createElement("g", {
63
+ transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
64
+ },
65
+ /*#__PURE__*/
66
+ React.createElement("rect", {
67
+ strokeWidth: region.groupHighlighted ? 3 : 0,
68
+ x: 0,
69
+ y: 0,
70
+ width: Math.max(region.w * iw, 0),
71
+ height: Math.max(region.h * ih, 0),
72
+ stroke: colorAlpha(clsColor(region.cls), 0.85),
73
+ fill: region.groupHighlighted ? colorAlpha(clsColor(region.cls), 0.15) : colorAlpha(groupColor(region.groupId), 0.5)
74
+ }))
75
+ );
61
76
  } else {
62
- return React.createElement("g", {
63
- transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
64
- }, React.createElement("rect", {
65
- strokeWidth: 2,
66
- x: 0,
67
- y: 0,
68
- width: Math.max(region.w * iw, 0),
69
- height: Math.max(region.h * ih, 0),
70
- stroke: colorAlpha(clsColor(region.cls), 0.85),
71
- fill: colorAlpha(clsColor(region.cls), 0.85)
72
- }));
77
+ return (
78
+ /*#__PURE__*/
79
+ React.createElement("g", {
80
+ transform: "translate(".concat(region.x * iw, " ").concat(region.y * ih, ")")
81
+ },
82
+ /*#__PURE__*/
83
+ React.createElement("rect", {
84
+ strokeWidth: 2,
85
+ x: 0,
86
+ y: 0,
87
+ width: Math.max(region.w * iw, 0),
88
+ height: Math.max(region.h * ih, 0),
89
+ stroke: colorAlpha(clsColor(region.cls), 0.85),
90
+ fill: colorAlpha(clsColor(region.cls), 0.85)
91
+ }))
92
+ );
73
93
  }
74
94
  }),
75
95
  polygon: memo(function (_ref4) {
@@ -79,20 +99,23 @@ var RegionComponents = {
79
99
  fullSegmentationMode = _ref4.fullSegmentationMode;
80
100
  var Component = region.open ? "polyline" : "polygon";
81
101
  var alphaBase = fullSegmentationMode ? 0.5 : 1;
82
- return React.createElement(Component, {
83
- points: region.points.map(function (_ref5) {
84
- var _ref6 = _slicedToArray(_ref5, 2),
85
- x = _ref6[0],
86
- y = _ref6[1];
102
+ return (
103
+ /*#__PURE__*/
104
+ React.createElement(Component, {
105
+ points: region.points.map(function (_ref5) {
106
+ var _ref6 = _slicedToArray(_ref5, 2),
107
+ x = _ref6[0],
108
+ y = _ref6[1];
87
109
 
88
- return [x * iw, y * ih];
89
- }).map(function (a) {
90
- return a.join(" ");
91
- }).join(" "),
92
- strokeWidth: 2,
93
- stroke: colorAlpha(region.color, 0.75),
94
- fill: colorAlpha(region.color, 0.25)
95
- });
110
+ return [x * iw, y * ih];
111
+ }).map(function (a) {
112
+ return a.join(" ");
113
+ }).join(" "),
114
+ strokeWidth: 2,
115
+ stroke: colorAlpha(region.color, 0.75),
116
+ fill: colorAlpha(region.color, 0.25)
117
+ })
118
+ );
96
119
  }),
97
120
  keypoints: function keypoints(_ref7) {
98
121
  var region = _ref7.region,
@@ -109,51 +132,66 @@ var RegionComponents = {
109
132
  var _keypointDefinitions$ = keypointDefinitions[keypointsDefinitionId],
110
133
  landmarks = _keypointDefinitions$.landmarks,
111
134
  connections = _keypointDefinitions$.connections;
112
- return React.createElement("g", null, Object.entries(points).map(function (_ref8, i) {
113
- var _ref9 = _slicedToArray(_ref8, 2),
114
- keypointId = _ref9[0],
115
- _ref9$ = _ref9[1],
116
- x = _ref9$.x,
117
- y = _ref9$.y;
135
+ return (
136
+ /*#__PURE__*/
137
+ React.createElement("g", null, Object.entries(points).map(function (_ref8, i) {
138
+ var _ref9 = _slicedToArray(_ref8, 2),
139
+ keypointId = _ref9[0],
140
+ _ref9$ = _ref9[1],
141
+ x = _ref9$.x,
142
+ y = _ref9$.y;
118
143
 
119
- return React.createElement("g", {
120
- key: i,
121
- transform: "translate(".concat(x * iw, " ").concat(y * ih, ")")
122
- }, React.createElement("path", {
123
- d: "M0 8L8 0L0 -8L-8 0Z",
124
- strokeWidth: 2,
125
- stroke: landmarks[keypointId].color,
126
- fill: "transparent"
127
- }));
128
- }), connections.map(function (_ref10) {
129
- var _ref11 = _slicedToArray(_ref10, 2),
130
- kp1Id = _ref11[0],
131
- kp2Id = _ref11[1];
144
+ return (
145
+ /*#__PURE__*/
146
+ React.createElement("g", {
147
+ key: i,
148
+ transform: "translate(".concat(x * iw, " ").concat(y * ih, ")")
149
+ },
150
+ /*#__PURE__*/
151
+ React.createElement("path", {
152
+ d: "M0 8L8 0L0 -8L-8 0Z",
153
+ strokeWidth: 2,
154
+ stroke: landmarks[keypointId].color,
155
+ fill: "transparent"
156
+ }))
157
+ );
158
+ }), connections.map(function (_ref10) {
159
+ var _ref11 = _slicedToArray(_ref10, 2),
160
+ kp1Id = _ref11[0],
161
+ kp2Id = _ref11[1];
132
162
 
133
- var kp1 = points[kp1Id];
134
- var kp2 = points[kp2Id];
135
- var midPoint = {
136
- x: (kp1.x + kp2.x) / 2,
137
- y: (kp1.y + kp2.y) / 2
138
- };
139
- return React.createElement("g", {
140
- key: "".concat(kp1.x, ",").concat(kp1.y, ".").concat(kp2.x, ",").concat(kp2.y)
141
- }, React.createElement("line", {
142
- x1: kp1.x * iw,
143
- y1: kp1.y * ih,
144
- x2: midPoint.x * iw,
145
- y2: midPoint.y * ih,
146
- strokeWidth: 2,
147
- stroke: landmarks[kp1Id].color
148
- }), React.createElement("line", {
149
- x1: kp2.x * iw,
150
- y1: kp2.y * ih,
151
- x2: midPoint.x * iw,
152
- y2: midPoint.y * ih,
153
- strokeWidth: 2,
154
- stroke: landmarks[kp2Id].color
155
- }));
156
- }));
163
+ var kp1 = points[kp1Id];
164
+ var kp2 = points[kp2Id];
165
+ var midPoint = {
166
+ x: (kp1.x + kp2.x) / 2,
167
+ y: (kp1.y + kp2.y) / 2
168
+ };
169
+ return (
170
+ /*#__PURE__*/
171
+ React.createElement("g", {
172
+ key: "".concat(kp1.x, ",").concat(kp1.y, ".").concat(kp2.x, ",").concat(kp2.y)
173
+ },
174
+ /*#__PURE__*/
175
+ React.createElement("line", {
176
+ x1: kp1.x * iw,
177
+ y1: kp1.y * ih,
178
+ x2: midPoint.x * iw,
179
+ y2: midPoint.y * ih,
180
+ strokeWidth: 2,
181
+ stroke: landmarks[kp1Id].color
182
+ }),
183
+ /*#__PURE__*/
184
+ React.createElement("line", {
185
+ x1: kp2.x * iw,
186
+ y1: kp2.y * ih,
187
+ x2: midPoint.x * iw,
188
+ y2: midPoint.y * ih,
189
+ strokeWidth: 2,
190
+ stroke: landmarks[kp2Id].color
191
+ }))
192
+ );
193
+ }))
194
+ );
157
195
  },
158
196
  "expanding-line": memo(function (_ref12) {
159
197
  var region = _ref12.region,
@@ -201,38 +239,52 @@ var RegionComponents = {
201
239
  }).asMutable();
202
240
  secondSection.reverse();
203
241
  var lastPoint = points.slice(-1)[0];
204
- return React.createElement(React.Fragment, null, React.createElement("polygon", {
205
- points: firstSection.concat(region.candidatePoint ? [region.candidatePoint] : []).concat(secondSection).map(function (p) {
206
- return "".concat(p.x * iw, " ").concat(p.y * ih);
207
- }).join(" "),
208
- strokeWidth: 2,
209
- stroke: colorAlpha(region.color, 0.75),
210
- fill: colorAlpha(region.color, 0.25)
211
- }), points.map(function (_ref18, i) {
212
- var x = _ref18.x,
213
- y = _ref18.y,
214
- angle = _ref18.angle;
215
- return React.createElement("g", {
216
- key: i,
217
- transform: "translate(".concat(x * iw, " ").concat(y * ih, ") rotate(").concat(-(angle || 0) * 180 / Math.PI, ")")
218
- }, React.createElement("g", null, React.createElement("rect", {
219
- x: -5,
220
- y: -5,
221
- width: 10,
222
- height: 10,
242
+ return (
243
+ /*#__PURE__*/
244
+ React.createElement(React.Fragment, null,
245
+ /*#__PURE__*/
246
+ React.createElement("polygon", {
247
+ points: firstSection.concat(region.candidatePoint ? [region.candidatePoint] : []).concat(secondSection).map(function (p) {
248
+ return "".concat(p.x * iw, " ").concat(p.y * ih);
249
+ }).join(" "),
223
250
  strokeWidth: 2,
224
251
  stroke: colorAlpha(region.color, 0.75),
225
252
  fill: colorAlpha(region.color, 0.25)
226
- })));
227
- }), React.createElement("rect", {
228
- x: lastPoint.x * iw - 8,
229
- y: lastPoint.y * ih - 8,
230
- width: 16,
231
- height: 16,
232
- strokeWidth: 4,
233
- stroke: colorAlpha(region.color, 0.5),
234
- fill: "transparent"
235
- }));
253
+ }), points.map(function (_ref18, i) {
254
+ var x = _ref18.x,
255
+ y = _ref18.y,
256
+ angle = _ref18.angle;
257
+ return (
258
+ /*#__PURE__*/
259
+ React.createElement("g", {
260
+ key: i,
261
+ transform: "translate(".concat(x * iw, " ").concat(y * ih, ") rotate(").concat(-(angle || 0) * 180 / Math.PI, ")")
262
+ },
263
+ /*#__PURE__*/
264
+ React.createElement("g", null,
265
+ /*#__PURE__*/
266
+ React.createElement("rect", {
267
+ x: -5,
268
+ y: -5,
269
+ width: 10,
270
+ height: 10,
271
+ strokeWidth: 2,
272
+ stroke: colorAlpha(region.color, 0.75),
273
+ fill: colorAlpha(region.color, 0.25)
274
+ })))
275
+ );
276
+ }),
277
+ /*#__PURE__*/
278
+ React.createElement("rect", {
279
+ x: lastPoint.x * iw - 8,
280
+ y: lastPoint.y * ih - 8,
281
+ width: 16,
282
+ height: 16,
283
+ strokeWidth: 4,
284
+ stroke: colorAlpha(region.color, 0.5),
285
+ fill: "transparent"
286
+ }))
287
+ );
236
288
  }),
237
289
  pixel: function pixel() {
238
290
  return null;
@@ -248,14 +300,17 @@ export var WrappedRegionList = memo(function (_ref19) {
248
300
  return r.visible !== false;
249
301
  }).map(function (r) {
250
302
  var Component = RegionComponents[r.type];
251
- return React.createElement(Component, {
252
- key: r.id,
253
- region: r,
254
- iw: iw,
255
- ih: ih,
256
- keypointDefinitions: keypointDefinitions,
257
- fullSegmentationMode: fullSegmentationMode
258
- });
303
+ return (
304
+ /*#__PURE__*/
305
+ React.createElement(Component, {
306
+ key: r.id,
307
+ region: r,
308
+ iw: iw,
309
+ ih: ih,
310
+ keypointDefinitions: keypointDefinitions,
311
+ fullSegmentationMode: fullSegmentationMode
312
+ })
313
+ );
259
314
  });
260
315
  }, function (n, p) {
261
316
  return n.regions === p.regions && n.iw === p.iw && n.ih === p.ih;
@@ -270,25 +325,30 @@ export var RegionShapes = function RegionShapes(_ref20) {
270
325
  var iw = imagePosition.bottomRight.x - imagePosition.topLeft.x;
271
326
  var ih = imagePosition.bottomRight.y - imagePosition.topLeft.y;
272
327
  if (isNaN(iw) || isNaN(ih)) return null;
273
- return React.createElement("svg", {
274
- width: iw,
275
- height: ih,
276
- style: {
277
- position: "absolute",
278
- zIndex: 2,
279
- left: imagePosition.topLeft.x,
280
- top: imagePosition.topLeft.y,
281
- pointerEvents: "none",
328
+ return (
329
+ /*#__PURE__*/
330
+ React.createElement("svg", {
282
331
  width: iw,
283
- height: ih
284
- }
285
- }, React.createElement(WrappedRegionList, {
286
- key: "wrapped-region-list",
287
- regions: regions,
288
- iw: iw,
289
- ih: ih,
290
- keypointDefinitions: keypointDefinitions,
291
- fullSegmentationMode: fullSegmentationMode
292
- }));
332
+ height: ih,
333
+ style: {
334
+ position: "absolute",
335
+ zIndex: 2,
336
+ left: imagePosition.topLeft.x,
337
+ top: imagePosition.topLeft.y,
338
+ pointerEvents: "none",
339
+ width: iw,
340
+ height: ih
341
+ }
342
+ },
343
+ /*#__PURE__*/
344
+ React.createElement(WrappedRegionList, {
345
+ key: "wrapped-region-list",
346
+ regions: regions,
347
+ iw: iw,
348
+ ih: ih,
349
+ keypointDefinitions: keypointDefinitions,
350
+ fullSegmentationMode: fullSegmentationMode
351
+ }))
352
+ );
293
353
  };
294
354
  export default RegionShapes;
@@ -58,87 +58,101 @@ export var RegionTags = function RegionTags(_ref) {
58
58
  };
59
59
 
60
60
  if (region.locked) {
61
- return React.createElement("div", {
61
+ return (
62
+ /*#__PURE__*/
63
+ React.createElement("div", {
64
+ key: region.id,
65
+ style: _objectSpread({
66
+ position: "absolute"
67
+ }, coords, {
68
+ zIndex: 10 + (region.editingLabels ? 5 : 0)
69
+ })
70
+ },
71
+ /*#__PURE__*/
72
+ React.createElement(Paper, {
73
+ style: _objectSpread({
74
+ position: "absolute",
75
+ left: 0
76
+ }, displayOnTop ? {
77
+ bottom: 0
78
+ } : {
79
+ top: 0
80
+ }, {
81
+ zIndex: 10,
82
+ backgroundColor: "#fff",
83
+ borderRadius: 4,
84
+ padding: 2,
85
+ paddingBottom: 0,
86
+ opacity: 0.5,
87
+ pointerEvents: "none"
88
+ })
89
+ },
90
+ /*#__PURE__*/
91
+ React.createElement(LockIcon, {
92
+ style: {
93
+ width: 16,
94
+ height: 16,
95
+ color: "#333"
96
+ }
97
+ })))
98
+ );
99
+ }
100
+
101
+ return (
102
+ /*#__PURE__*/
103
+ React.createElement("div", {
62
104
  key: region.id,
63
105
  style: _objectSpread({
64
106
  position: "absolute"
65
107
  }, coords, {
66
- zIndex: 10 + (region.editingLabels ? 5 : 0)
67
- })
68
- }, React.createElement(Paper, {
108
+ zIndex: 10 + (region.editingLabels ? 5 : 0),
109
+ width: 200
110
+ }),
111
+ onMouseDown: function onMouseDown(e) {
112
+ return e.preventDefault();
113
+ },
114
+ onMouseUp: function onMouseUp(e) {
115
+ return e.preventDefault();
116
+ },
117
+ onMouseEnter: function onMouseEnter(e) {
118
+ if (region.editingLabels) {
119
+ mouseEvents.onMouseUp(e);
120
+ e.button = 1;
121
+ mouseEvents.onMouseUp(e);
122
+ }
123
+ }
124
+ },
125
+ /*#__PURE__*/
126
+ React.createElement("div", Object.assign({
69
127
  style: _objectSpread({
70
128
  position: "absolute",
129
+ zIndex: 20,
71
130
  left: 0
72
131
  }, displayOnTop ? {
73
132
  bottom: 0
74
133
  } : {
75
134
  top: 0
76
- }, {
77
- zIndex: 10,
78
- backgroundColor: "#fff",
79
- borderRadius: 4,
80
- padding: 2,
81
- paddingBottom: 0,
82
- opacity: 0.5,
83
- pointerEvents: "none"
84
135
  })
85
- }, React.createElement(LockIcon, {
86
- style: {
87
- width: 16,
88
- height: 16,
89
- color: "#333"
90
- }
91
- })));
92
- }
93
-
94
- return React.createElement("div", {
95
- key: region.id,
96
- style: _objectSpread({
97
- position: "absolute"
98
- }, coords, {
99
- zIndex: 10 + (region.editingLabels ? 5 : 0),
100
- width: 200
101
- }),
102
- onMouseDown: function onMouseDown(e) {
103
- return e.preventDefault();
104
- },
105
- onMouseUp: function onMouseUp(e) {
106
- return e.preventDefault();
107
- },
108
- onMouseEnter: function onMouseEnter(e) {
109
- if (region.editingLabels) {
110
- mouseEvents.onMouseUp(e);
111
- e.button = 1;
112
- mouseEvents.onMouseUp(e);
113
- }
114
- }
115
- }, React.createElement("div", Object.assign({
116
- style: _objectSpread({
117
- position: "absolute",
118
- zIndex: 20,
119
- left: 0
120
- }, displayOnTop ? {
121
- bottom: 0
122
- } : {
123
- top: 0
124
- })
125
- }, !region.editingLabels ? copyWithout(mouseEvents, "onMouseDown", "onMouseUp") : {}), React.createElement(RegionLabel, {
126
- allowedClasses: regionClsList,
127
- allowedTags: regionTagList,
128
- onOpen: onBeginRegionEdit,
129
- onChange: onChangeRegion,
130
- onClose: onCloseRegionEdit,
131
- onDelete: onDeleteRegion,
132
- onDeleteGroup: onDeleteGroup,
133
- editing: region.editingLabels,
134
- region: region,
135
- regions: regions,
136
- imageSrc: imageSrc,
137
- onRegionClassAdded: onRegionClassAdded,
138
- allowComments: allowComments,
139
- hideNotEditingLabel: hideNotEditingLabel,
140
- allowedGroups: allowedGroups
141
- })));
136
+ }, !region.editingLabels ? copyWithout(mouseEvents, "onMouseDown", "onMouseUp") : {}),
137
+ /*#__PURE__*/
138
+ React.createElement(RegionLabel, {
139
+ allowedClasses: regionClsList,
140
+ allowedTags: regionTagList,
141
+ onOpen: onBeginRegionEdit,
142
+ onChange: onChangeRegion,
143
+ onClose: onCloseRegionEdit,
144
+ onDelete: onDeleteRegion,
145
+ onDeleteGroup: onDeleteGroup,
146
+ editing: region.editingLabels,
147
+ region: region,
148
+ regions: regions,
149
+ imageSrc: imageSrc,
150
+ onRegionClassAdded: onRegionClassAdded,
151
+ allowComments: allowComments,
152
+ hideNotEditingLabel: hideNotEditingLabel,
153
+ allowedGroups: allowedGroups
154
+ })))
155
+ );
142
156
  });
143
157
  };
144
158
  export default RegionTags;