Skip to content

Commit 0de6308

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents c066d98 + e1f78c0 commit 0de6308

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ You can find the sample layout file in ```src/layout/main.php```.
152152

153153
## Change log
154154

155+
### 4.1.1 - 2023-03-25
156+
* update to Materialize v1.2.2
157+
* added Slider properties `pauseOnHover` and `pauseOnFocus`
158+
155159
### 4.1.0 - 2022-12-10
156160
* update to Materialize v1.2.0
157161

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": "^7.4 || ^8.0",
1818
"yiisoft/yii2": "~2.0.0",
1919

20-
"npm-asset/materializecss--materialize": "1.2.0"
20+
"npm-asset/materializecss--materialize": "1.2.2"
2121
},
2222
"autoload": {
2323
"psr-4": {

src/widgets/media/Slider.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@ class Slider extends BaseWidget
116116
*/
117117
public $interval = 6000;
118118

119+
/**
120+
* @var boolean whether slider should pause when receive keyboard focus.
121+
*/
122+
public $pauseOnFocus = true;
123+
124+
/**
125+
* @var boolean whether slider should pause when hovered by mouse.
126+
*/
127+
public $pauseOnHover = true;
128+
119129
/**
120130
* Initialize the widget.
121131
*/
@@ -133,6 +143,8 @@ public function init()
133143
$this->clientOptions['height'] = $this->height;
134144
$this->clientOptions['duration'] = $this->duration;
135145
$this->clientOptions['interval'] = $this->interval;
146+
$this->clientOptions['pauseOnFocus'] = $this->pauseOnFocus;
147+
$this->clientOptions['pauseOnHover'] = $this->pauseOnHover;
136148

137149
$this->registerPlugin('Slider', '.slider');
138150
}

0 commit comments

Comments
 (0)