2017 © Pedro Peláez
 

yii2-extension yii2-jcrop-widget

Jcrop Image Cropping Plugin for Yii2.

image

dominus77/yii2-jcrop-widget

Jcrop Image Cropping Plugin for Yii2.

  • Wednesday, May 2, 2018
  • by dominus77
  • Repository
  • 1 Watchers
  • 2 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 13 % Grown

The README.md

yii2-jcrop-widget

Latest Version Software License Build Status codecov Scrutinizer Code Quality Total Downloads, (*1)

Jcrop - Image Cropping for jQuery, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require dominus77/yii2-jcrop-widget

or add, (*5)

"dominus77/yii2-jcrop-widget": "^2.1"

to the require section of your composer.json file., (*6)

Usage

Once the extension is installed, simply use it in your code by mimimum run:, (*7)

= \dominus77\jcrop\JCrop::widget([
    'image' => Yii::getAlias('@web/uploads/image1.jpg') // url to your image   
]) ?>

Set Options:, (*8)

= \dominus77\jcrop\JCrop::widget([
    'image' => Yii::getAlias('@web/uploads/image1.jpg'),
    'pluginOptions' => [
        'minSize' => [50, 37],
        'maxSize' => [500, 370],
        'setSelect' => [10, 10, 40, 40],
        'bgColor' => 'black',
        'bgOpacity' => 0.5,
        'onSelect' => new yii\web\JsExpression("function(c){console.log(c.x);}"),
        'onChange' => new yii\web\JsExpression("function(c){console.log(c.x);}")
    ]
]) ?>

CallBack:, (*9)

= \dominus77\jcrop\JCrop::widget([
    'image' => Yii::getAlias('@web/uploads/image1.jpg'),
    'pluginOptions' => [//...],
    'callBack' => new yii\web\JsExpression("
        function(){
            jcrop_api = this;
        }
    ")
]) ?>

More Information

Please, check the Manual, (*10)

Testing

$ vendor/bin/phpunit

License

The MIT License (MIT). Please see License File for more information., (*11)

The Versions

02/05 2018

dev-master

9999999-dev

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

MIT BSD-3-Clause BSD-3

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77

28/04 2018

v2.1.1.0

2.1.1.0

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77

28/04 2018

v2.1.0

2.1.0.0

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77

18/11 2017

v2.0.0

2.0.0.0

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77

13/11 2017

v1.1.0

1.1.0.0

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77

13/11 2017

v1.0.0

1.0.0.0

Jcrop Image Cropping Plugin for Yii2.

  Sources   Download

BSD-3-Clause

The Requires

 

by Alexey Schevchenko

extension yii2 widget jcrop dominus77