#Resize & Crop A vanilla Javascript library that provides the tools and UI necessary to manipulate an image file in browser.
##Features
- Fully stylable with CSS.
- No JS dependencies.
- It's responsive
- Supports drag and drop
##Usage
var cropArea = document.querySelector('[data-cropresize-target]'),
cropResize = CropResize(cropArea, {
fileInput : document.querySelector('input#file-uploader[type="file"]'),
dropArea : document.querySelector('[data-drag-drop-target]'),
previewElement : document.querySelector('[data-cr-preview]')
});
##Browser Support
IE | Edge | Chrome | Mozilla | Safari |
---|---|---|---|---|
##API ###CropResize(fileInput, cropArea, settings):ICropResizeInterface
Name | Type | Description |
---|---|---|
cropArea | element | The element that will be used for file cropping. May be a canvas element or any open (<></>) tag element. |
settings | object | And object of optional arguments that may be supplied to the initializer. |
###ICropResizeInterface
Name | Type | Description |
---|---|---|
destroy | function() | Removes the class and unbinds all event listeners |
getInfo | function():IInformationInterface |
###Settings
###IInformationInterface
##License See LICENSE.