react-image-annotate
Advanced tools
Comparing version 1.5.4 to 1.5.5
@@ -20,2 +20,8 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray"; | ||
export default (function (state, action) { | ||
if (state.allowedArea && ["MOUSE_DOWN", "MOUSE_UP", "MOUSE_MOVE"].includes(action.type)) { | ||
var aa = state.allowedArea; | ||
action.x = clamp(action.x, aa.x, aa.x + aa.w); | ||
action.y = clamp(action.y, aa.y, aa.y + aa.h); | ||
} | ||
if (action.type === "ON_CLS_ADDED" && action.cls && action.cls !== "") { | ||
@@ -255,9 +261,2 @@ var oldRegionClsList = state.regionClsList; | ||
y = action.y; | ||
if (state.allowedArea) { | ||
var aa = state.allowedArea; | ||
x = clamp(x, aa.x, aa.x + aa.w); | ||
y = clamp(y, aa.x, aa.x + aa.w); | ||
} | ||
if (!state.mode) return state; | ||
@@ -407,9 +406,2 @@ if (!activeImage) return state; | ||
_y = action.y; | ||
if (state.allowedArea) { | ||
var _aa = state.allowedArea; | ||
_x = clamp(_x, _aa.x, _aa.x + _aa.w); | ||
_y = clamp(_y, _aa.x, _aa.x + _aa.w); | ||
} | ||
state = setIn(state, ["mouseDownAt"], { | ||
@@ -613,8 +605,2 @@ x: _x, | ||
if (state.allowedArea) { | ||
var _aa2 = state.allowedArea; | ||
_x2 = clamp(_x2, _aa2.x, _aa2.x + _aa2.w); | ||
_y2 = clamp(_y2, _aa2.x, _aa2.x + _aa2.w); | ||
} | ||
var _state3 = state, | ||
@@ -621,0 +607,0 @@ _state3$mouseDownAt = _state3.mouseDownAt, |
{ | ||
"name": "react-image-annotate", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "@fortawesome/fontawesome-svg-core": "^1.2.12", |
@@ -5,3 +5,3 @@ # React Image Annotate | ||
The best image/video annotation tool ever. [Check out the demo here](https://waoai.github.io/react-image-annotate/). | ||
The best image/video annotation tool ever. [Check out the demo here](https://universaldatatool.github.io/react-image-annotate/). | ||
@@ -8,0 +8,0 @@ ## Sponsors |
215895
5632