react-avatar-edit
Advanced tools
Comparing version 1.0.0 to 1.1.0
{ | ||
"name": "react-avatar-edit", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "ReactJS component to upload, crop, and preview avatars", | ||
@@ -9,3 +9,3 @@ "main": "lib/react-avatar.js", | ||
"start": "webpack-dev-server --open --config webpack.dev.js", | ||
"build": "webpack --config webpack.prod.js --optimize-minimize", | ||
"build": "webpack --config webpack.prod.js", | ||
"build:example": "webpack --config webpack.example.js" | ||
@@ -37,3 +37,3 @@ }, | ||
"devDependencies": { | ||
"@babel/cli": "^7.13.10", | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.11.6", | ||
@@ -45,3 +45,3 @@ "@babel/plugin-proposal-class-properties": "^7.10.4", | ||
"babel-loader": "^8.1.0", | ||
"compression-webpack-plugin": "^7.1.2", | ||
"compression-webpack-plugin": "9.0.0", | ||
"html-webpack-plugin": "5.3.1", | ||
@@ -51,7 +51,6 @@ "react": "16.8.3", | ||
"rollup-webpack-loader": "1.0.0", | ||
"uglifyjs-webpack-plugin": "2.2.0", | ||
"webpack": "^5.24.4", | ||
"webpack-bundle-analyzer": "^4.4.0", | ||
"webpack-cli": "4.5.0", | ||
"webpack-dev-server": "3.11.2" | ||
"webpack-cli": "4.8.0", | ||
"webpack-dev-server": "^4.3.0" | ||
}, | ||
@@ -58,0 +57,0 @@ "peerDependencies": { |
@@ -173,2 +173,3 @@ import React from 'react' | ||
const image = this.props.img || new Image(); | ||
image.crossOrigin = 'Anonymous'; | ||
if (!this.props.img && this.props.src) image.src = this.props.src; | ||
@@ -184,2 +185,8 @@ this.setState({ image }, () => { | ||
componentDidUpdate(prevProps, prevState) { | ||
if (prevProps.src !== this.props.src) { | ||
this.image.src = this.props.src | ||
} | ||
} | ||
onFileLoad(e) { | ||
@@ -186,0 +193,0 @@ e.preventDefault(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
221611
16
619