react-image-annotate-master-custom 0.0.6 → 0.0.9

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.
@@ -98,8 +98,27 @@ export var HighlightBox = function HighlightBox(_ref) {
98
98
  className: classnames(classes.highlightLight, {
99
99
  highlighted: r.highlighted
100
100
  })
101
- }, mouseEvents, {
102
- style: _objectSpread({
101
+ }, mouseEvents, !zoomWithPrimary && !dragWithPrimary ? {
102
+ onMouseDown: function onMouseDown(e) {
103
+ // if (
104
+ // !r.locked &&
105
+ // r.type === "point" &&
106
+ // r.highlighted &&
107
+ // e.button === 0
108
+ // ) {
109
+ // return onBeginMovePoint(r)
110
+ // }
111
+ if (e.button === 0 && !createWithPrimary) {
112
+ return onSelectRegion(r);
113
+ }
114
+
115
+ onSelectRegion(r);
116
+ mouseEvents.onMouseDown(e);
117
+ }
118
+ } : {}, {
119
+ style: _objectSpread({}, r.highlighted && {
120
+ pointerEvents: r.type !== "point" ? "none" : undefined
121
+ }, {
103
122
  position: "absolute"
104
123
  }, styleCoordsHorizontal)
105
124
  }), React.createElement("path", {
@@ -110,8 +129,27 @@ export var HighlightBox = function HighlightBox(_ref) {
110
129
  className: classnames(classes.highlightLight, {
111
130
  highlighted: r.highlighted
112
131
  })
113
- }, mouseEvents, {
114
- style: _objectSpread({
132
+ }, mouseEvents, !zoomWithPrimary && !dragWithPrimary ? {
133
+ onMouseDown: function onMouseDown(e) {
134
+ // if (
135
+ // !r.locked &&
136
+ // r.type === "point" &&
137
+ // r.highlighted &&
138
+ // e.button === 0
139
+ // ) {
140
+ // return onBeginMovePoint(r)
141
+ // }
142
+ if (e.button === 0 && !createWithPrimary) {
143
+ return onSelectRegion(r);
144
+ }
145
+
146
+ onSelectRegion(r);
147
+ mouseEvents.onMouseDown(e);
148
+ }
149
+ } : {}, {
150
+ style: _objectSpread({}, r.highlighted && {
151
+ pointerEvents: r.type !== "point" ? "none" : undefined
152
+ }, {
115
153
  position: "absolute"
116
154
  }, styleCoordsVertical)
117
155
  }), React.createElement("path", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-image-annotate-master-custom",
3
- "version": "0.0.6",
3
+ "version": "0.0.9",
4
4
  "dependencies": {
5
5
  "@fortawesome/fontawesome-svg-core": "^1.2.12",
6
6
  "@fortawesome/free-solid-svg-icons": "^5.6.3",