2017 © Pedro Peláez
 

yii2-extension yii2-elevatezoom

Elevatezoom widget for Yii2

image

amilna/yii2-elevatezoom

Elevatezoom widget for Yii2

  • Friday, March 13, 2015
  • by aaiyo
  • Repository
  • 1 Watchers
  • 6 Stars
  • 2,812 Installations
  • JavaScript
  • 2 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 1 Versions
  • 29 % Grown

The README.md

Elevate Zoom Widget for Yii2

An elevate zoom widget for Yii2 based on Elevate Zoom., (*1)

Installation

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

Either run, (*3)

php composer.phar require "amilna/yii2-elevatezoom" "*"

or add, (*4)

"amilna/yii2-elevatezoom" : "*"

to the require section of your application's composer.json file., (*5)

Usage

in View, (*6)

    use amilna\elevatezoom\ElevateZoom;

    $images = ['an url of zoom image 1','an url of zoom image n'];

    echo ElevateZoom::widget([
        'images'=>$images,
        'baseUrl'=>Yii::$app->urlManager->baseUrl.'/upload',
        'smallPrefix'=>'/.thumbs',
        'mediumPrefix'=>'',
    ]);

    /* //or another example set 'images' with 3 dimension array:
    $images'= [
        [   
            'image'=>'an url of zoom image 1',
            'small'=>'an url of gallery display image 1',
            'medium'=>'an url of basic display image 1'
        ],
        [   
            'image'=>'an url of zoom image n',
            'small'=>'an url of gallery display image n',
            'medium'=>'an url of basic display image n'
        ],
    ];

    echo ElevateZoom::widget([
        'images'=>$images,      
    ]);
    */


'images' is array of images (1 or 3 dimensions, if 1 dimensions then you should set baseUrl, smallPrefix and mediumPrefix) or activeDataProvider (if activeDataProvider you should set imageKey, smallKey and mediumKey), (*7)

available options:, (*8)

  1. images
  2. css (custom css)
  3. baseUrl (string basic replacer of image url)
  4. smallPrefix (string replacer to get small size image url)
  5. mediumPrefix (string replacer to get medium size image url)
  6. imageKey (model atribute that store zoom size image)
  7. smallKey (model atribute that store small size image)
  8. mediumKey (model atribute that store medium size image)
  9. targetId (custom container id)
  10. options (please see examples)

The Versions

13/03 2015

dev-master

9999999-dev

Elevatezoom widget for Yii2

  Sources   Download

MIT

The Requires

 

yii2 widget gallery image elevatezoom