Wallogit.com
2017 © Pedro Peláez
yii2-turntable
A turntable for lottery activity., (*1)
, (*2)
, (*3)
composer require ga/turntable dev-master, (*4)
In the view file you should include following code:, (*5)
<?php use ga\turntable\TurntableWidget; use ga\turntable\TurntableAsset; TurntableAsset::register($this); ?> <?= TurntableWidget::widget(['scrollType'=>TurntableWidget::TURNTABLE_SCROLL])?>
The configuartion is very easy,we can set the public property:
* $deg animate degree
* $animationTime in the other word it's the speed of animation
* $pointerCallback js code in here.If the pointer complete animation will trigger this function.
* $turntableCallback js code in here.If the turntable complete animation will trigger this function.
* $scrollType self::POINTER_SCROLL or self::TURNTABLE_SCROLL
* $pointerImagePath custom pointer image path
* $turntableImagePath custom turntable image path
* $turntableBGImagePath custom turntable background image path, (*6)