2017 © Pedro Peláez
 

library yii2-imgareaselect-widget

yii2-imgareaselect-widget

image

xj/yii2-imgareaselect-widget

yii2-imgareaselect-widget

  • Saturday, June 27, 2015
  • by xjflyttp
  • Repository
  • 1 Watchers
  • 1 Stars
  • 167 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

yii2-imgareaselect-widget

https://github.com/odyniec/imgareaselect

composer.json

"require": {
    "xj/yii2-imgareaselect-widget": "*"
},

use assets

ImgareaselectAsset::registerWithStyle($this, ImgareaselectAsset::STYLE_ANIMATED);
//OR
ImgareaselectAsset::registerWithStyle($this, ImgareaselectAsset::STYLE_DEFAULT);

use widget

Html::img('@web/images/color/srgb.jpg', [
    'id' => 'myimage',
    'width' => 400,
]);

ImgAreaSelect::widget([
    'id' => '#myimage',
    'style' => ImgareaselectAsset::STYLE_ANIMATED, //default STYLE_DEFAULT
    'position' => View::POS_READY, //default POS_LOAD
    'clientOptions' => [
        'maxWidth' => 100,
        'maxHeight' => 100,
        'onInit' => 'function(img, selection){console.log("event: init");}',
        'onSelectStart' => 'function(img, selection){console.log("event: select start");}',
        'onSelectChange' => 'function(img, selection){console.log("event: select change");}',
        'onSelectEnd' => 'function(img, selection){console.log("event: select end");}',
    ]
]);

The Versions

27/06 2015

dev-master

9999999-dev

yii2-imgareaselect-widget

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp

27/06 2015

1.0.0

1.0.0.0

yii2-imgareaselect-widget

  Sources   Download

BSD-3-Clause

The Requires

 

by Avatar xjflyttp