Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "idcrop", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Image cropper utility that crops an image in any polygonal shape chosen and returns a base64 of the cropped area.", | ||
@@ -13,4 +13,4 @@ "main": "dist/js/bundle.min.js", | ||
"start": "webpack-dev-server --open -d", | ||
"lint": "./node_modules/.bin/eslint ./lib/js/*.js", | ||
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix" | ||
"lint": "./node_modules/.bin/eslint ./lib/js/*.js && ./node_modules/.bin/eslint ./lib/js/idcrop/*.js", | ||
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix && ./node_modules/.bin/eslint ./lib/js/idcrop/*.js --fix" | ||
}, | ||
@@ -17,0 +17,0 @@ "repository": { |
@@ -16,5 +16,12 @@ # IdCrop | ||
```js | ||
const idcrop = require('idcrop') | ||
const IdCrop = require("idcrop"); | ||
idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer', 4) | ||
const idcrop = new IdCrop( | ||
"#displayContainer", | ||
"#previewContainer", | ||
"#toolbarContainer", | ||
6 | ||
); | ||
idcrop.init(); | ||
``` | ||
@@ -24,5 +31,5 @@ | ||
- The id of the container you want the toolbar to render at. | ||
- The id of the container you want the display to render at. | ||
- The id of the container you want the preview to render at. | ||
- The CSS selector of the container you want the toolbar to render at. | ||
- The CSS selector of the container you want the display to render at. | ||
- The CSS selector of the container you want the preview to render at. | ||
- The number of sides you want the cropping polygon to have. | ||
@@ -35,2 +42,4 @@ | ||
**For now, you can only have one cropper per page.** | ||
```html | ||
@@ -37,0 +46,0 @@ <!DOCTYPE html> |
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
56443
5
186
79
0