Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

advanced-cropper

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

advanced-cropper - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

19

instance/AbstractCropper.js

@@ -86,12 +86,17 @@ import { __assign } from 'tslib';

var state = isFunction(modifier) ? modifier(previousData.state, settings) : modifier;
var changed = ['coordinates', 'boundary', 'visibleArea', 'imageSize'].some(function (property) {
var _a;
return !deepCompare((_a = previousData.state) === null || _a === void 0 ? void 0 : _a[property], state === null || state === void 0 ? void 0 : state[property], state ? 1e-3 * getCoefficient(state) : 1e-3);
});
var tolerance = state ? 1e-3 * getCoefficient(state) : 1e-3;
var somethingChanged = !deepCompare(previousData.state, state, tolerance);
var affectTransitionProperties = [
'coordinates',
'boundary',
'visibleArea',
'imageSize',
'transforms',
].some(function (property) { var _a; return !deepCompare((_a = previousData.state) === null || _a === void 0 ? void 0 : _a[property], state === null || state === void 0 ? void 0 : state[property], tolerance); });
var currentData = previousData;
if (changed) {
if (transitions && changed) {
if (somethingChanged) {
if (transitions && affectTransitionProperties) {
_this.disableTransitions();
}
currentData = __assign(__assign({}, currentData), { state: copyState(state), transitions: transitions && changed });
currentData = __assign(__assign({}, currentData), { state: copyState(state), transitions: transitions && affectTransitionProperties });
_this.setData(currentData);

@@ -98,0 +103,0 @@ runCallback(onChange, getInstance);

@@ -90,12 +90,17 @@ 'use strict';

var state = index.isFunction(modifier) ? modifier(previousData.state, settings) : modifier;
var changed = ['coordinates', 'boundary', 'visibleArea', 'imageSize'].some(function (property) {
var _a;
return !index.deepCompare((_a = previousData.state) === null || _a === void 0 ? void 0 : _a[property], state === null || state === void 0 ? void 0 : state[property], state ? 1e-3 * helpers.getCoefficient(state) : 1e-3);
});
var tolerance = state ? 1e-3 * helpers.getCoefficient(state) : 1e-3;
var somethingChanged = !index.deepCompare(previousData.state, state, tolerance);
var affectTransitionProperties = [
'coordinates',
'boundary',
'visibleArea',
'imageSize',
'transforms',
].some(function (property) { var _a; return !index.deepCompare((_a = previousData.state) === null || _a === void 0 ? void 0 : _a[property], state === null || state === void 0 ? void 0 : state[property], tolerance); });
var currentData = previousData;
if (changed) {
if (transitions && changed) {
if (somethingChanged) {
if (transitions && affectTransitionProperties) {
_this.disableTransitions();
}
currentData = tslib.__assign(tslib.__assign({}, currentData), { state: copyState.copyState(state), transitions: transitions && changed });
currentData = tslib.__assign(tslib.__assign({}, currentData), { state: copyState.copyState(state), transitions: transitions && affectTransitionProperties });
_this.setData(currentData);

@@ -102,0 +107,0 @@ runCallback(onChange, getInstance);

{
"name": "advanced-cropper",
"version": "0.10.2",
"version": "0.10.3",
"description": "The core of the advanced cropper libraries family",

@@ -21,3 +21,3 @@ "author": "Norserium",

"scripts": {
"build": "npm run build:clean &&npm run build:library && npm run build:packages",
"build": "npm run build:clean && npm run build:library && npm run build:packages",
"build:clean": "node scripts/clean.js",

@@ -32,3 +32,4 @@ "build:library": "cross-env NODE_ENV=production rollup -c",

"lint:fix": "eslint --fix src/**/*.{js,vue}",
"publish:dist": "npm publish dist"
"prepare:dist": "npm run build",
"publish:dist": "npm run prepare:dist && npm publish dist"
},

@@ -35,0 +36,0 @@ "dependencies": {

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