Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hooman-mirghasemi/yii2-iviewer

php yii2 extention
https://github.com/hooman-mirghasemi/yii2-iviewer

iviewer php yii2-extension

Last synced: 22 days ago
JSON representation

php yii2 extention

Awesome Lists containing this project

README

        

iviewer
=======
iviewer can use for zoom and rotate image, it is use iviewer jquery plugin

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist hooman.mirghasemi/yii2-iviewer "*"
```

or add

```
"hooman.mirghasemi/yii2-iviewer": "*"
```

to the require section of your `composer.json` file.

Usage
-----
Note : you should load fontAsome in your project before use it.
Once the extension is installed, simply use it in your code by :

```php
'#iviewer-content',
'loadingSelector'=>'#iv-loading',
'beforeIviewer'=>'$("#iviewer-content").html("");',
'imageSrc' => 'path to your image',
]);
?>






در حال بارگذاری تصویر






```

Or you can use it as image gallery one or more in a page that open in a bootstrap modal with next and previwe buttons
like this:

first config iviewer module in config of application
```php
'modules' => [

'iviewer' => [
'class' => 'hoomanMirghasemi\iviewer\Module',
'loadingText' => 'loading ...',
],
],
```

for use it in a view file write code like this:
```php
'iviewer-gallery-1',
'modalCloseText' => 'close',
]);
?>




















'iviewer-gallery-2',
'modalCloseText' => 'close',
]);
?>




this is on html element between ivewer items


test one element

```
points:
be sure that selectorId and html element contains iviwer elements
are same. and use iviewer-gallery-item-holder and iviewer-gallery-item classes for
elements. data-target should be same with selectorId+"-modal". also
data-iviewer-src is a necessary field