New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-image-annotate

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-annotate - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

31

Annotator/reducers/general-reducer.js

@@ -13,2 +13,3 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";

import convertExpandingLineToPolygon from "./convert-expanding-line-to-polygon";
import clamp from "clamp";

@@ -254,2 +255,9 @@ var getRandomId = function getRandomId() {

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;

@@ -399,2 +407,9 @@ 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"], {

@@ -405,12 +420,2 @@ x: _x,

if (state.allowedArea) {
// TODO clamp x/y instead of giving up
// TODO or image bounds
var aa = state.allowedArea;
if (_x < aa.x || _x > aa.x + aa.w || _y < aa.y || _y > aa.y + aa.h) {
return state;
}
}
if (state.mode) {

@@ -609,2 +614,8 @@ switch (state.mode.mode) {

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,

@@ -611,0 +622,0 @@ _state3$mouseDownAt = _state3.mouseDownAt,

{
"name": "react-image-annotate",
"version": "1.5.3",
"version": "1.5.4",
"dependencies": {

@@ -12,2 +12,3 @@ "@fortawesome/fontawesome-svg-core": "^1.2.12",

"autoseg": "^0.0.8",
"clamp": "^1.0.1",
"color-alpha": "^1.0.4",

@@ -14,0 +15,0 @@ "get-image-data": "^3.0.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc