react-image-annotate-master-custom 0.0.8 → 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.
- package/HighlightBox/index.js +36 -2
- package/package.json +1 -1
package/HighlightBox/index.js
CHANGED
|
@@ -98,7 +98,24 @@ export var HighlightBox = function HighlightBox(_ref) {
|
|
|
98
98
|
className: classnames(classes.highlightLight, {
|
|
99
99
|
highlighted: r.highlighted
|
|
100
100
|
})
|
|
101
|
-
}, mouseEvents, {
|
|
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
|
+
} : {}, {
|
|
102
119
|
style: _objectSpread({}, r.highlighted && {
|
|
103
120
|
pointerEvents: r.type !== "point" ? "none" : undefined
|
|
104
121
|
}, {
|
|
@@ -112,7 +129,24 @@ export var HighlightBox = function HighlightBox(_ref) {
|
|
|
112
129
|
className: classnames(classes.highlightLight, {
|
|
113
130
|
highlighted: r.highlighted
|
|
114
131
|
})
|
|
115
|
-
}, mouseEvents, {
|
|
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
|
+
} : {}, {
|
|
116
150
|
style: _objectSpread({}, r.highlighted && {
|
|
117
151
|
pointerEvents: r.type !== "point" ? "none" : undefined
|
|
118
152
|
}, {
|