1 | export default {
|
2 | get: function() {
|
3 | return this._.speed;
|
4 | },
|
5 | set: function(s) {
|
6 | if (typeof s !== 'number' ||
|
7 | isNaN(s) ||
|
8 | !isFinite(s) ||
|
9 | s <= 0) {
|
10 | return this._.speed;
|
11 | }
|
12 | this._.speed = s;
|
13 | if (this._.width) {
|
14 | this._.duration = this._.width / s;
|
15 | }
|
16 | return s;
|
17 | }
|
18 | };
|