webvimark / cropper
There is no license information available for the latest version (dev-master) of this package.
Cropper for Yii 2
dev-master
2014-10-25 11:31 UTC
Requires
This package is auto-updated.
Last update: 2024-10-29 04:14:36 UTC
README
Image cropper
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist webvimark/cropper "*"
or add
"webvimark/cropper": "*"
to the require section of your composer.json
file.
Usage
<?= Cropper::widget([ 'acceptUrl' => Url::to(['/slider/slider-image/crop']), 'fileInputName' => 'cropperFileUpload', 'imageSelector' => '#slider-image', 'resultSize' => array($model->slider->width, $model->slider->height), 'cropParams'=>array( // 'minSize' => array($model->slider->width, $model->slider->height), 'setSelect' => array(0,0,$model->slider->width, $model->slider->height), 'aspectRatio' => $model->slider->width/$model->slider->height, ), 'customParams'=>array( 'modelId'=>$model->id, ), ]) ?>