xj/yii2-imgareaselect-widget 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

xj/yii2-imgareaselect-widget

最新稳定版本:1.0.0

Composer 安装命令:

composer require xj/yii2-imgareaselect-widget

包简介

yii2-imgareaselect-widget

README 文档

README

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");}',
    ]
]);

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-06-27