Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raoul2000/yii2-jcrop-widget
This yii2 extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)
https://github.com/raoul2000/yii2-jcrop-widget
Last synced: about 1 month ago
JSON representation
This yii2 extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)
- Host: GitHub
- URL: https://github.com/raoul2000/yii2-jcrop-widget
- Owner: raoul2000
- License: bsd-3-clause
- Created: 2014-05-02T17:08:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-28T13:50:42.000Z (almost 7 years ago)
- Last Synced: 2024-10-09T16:18:52.253Z (about 1 month ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 10
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGE.md
- License: LICENSE
Awesome Lists containing this project
README
JCrop Yii2 Extension
====================
This yii2 extension is a wrapper for the jQuery Image Cropping Plugin (jcrop)Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist raoul2000/yii2-jcrop-widget "*"
```or add
```
"raoul2000/yii2-jcrop-widget": "*"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it in your code by :
```php
raoul2000\jcrop\JCropWidget::widget([
'selector' => '#image_id',
'pluginOptions' => [
'aspectRatio' => 1,
'minSize' => [50,50],
'maxSize' => [200,200],
'setSelect' => [10,10,40,40],
'bgColor' => 'black',
'bgOpacity' => '0.5',
'onChange' => new yii\web\JsExpression('function(c){console.log(c.x);}')
]
]);
```For complete documentation please refer to the [official JCrop page](http://deepliquid.com/content/Jcrop.html)
License
-------**yii2-jcrop-widget** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.