@@ -80,55 +80,70 @@ var view = /** @class */ (function () {
80
80
} ( element , back ) ;
81
81
manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
82
82
} ;
83
- view . prototype . setColorInArrayElement = function ( index , i , colorOn ) {
84
- var forwardSteps = function ( index , i , colorOn , colors ) {
83
+ view . prototype . setColorInArrayElement = function ( index , color , colorOn ) {
84
+ var forwardSteps = function ( index , color , colorOn ) {
85
85
return function ( ) {
86
- setColor ( index , i , colorOn ) ;
86
+ setColor ( index , color , colorOn ) ;
87
87
} ;
88
- } ( index , i , colorOn , colors ) ;
89
- var backwardSteps = function ( index , i , colorOn , colors ) {
88
+ } ( index , color , colorOn ) ;
89
+ var backwardSteps = function ( index , color , colorOn ) {
90
90
return function ( ) {
91
- setColor ( index , i , ! colorOn ) ;
91
+ setColor ( index , color , ! colorOn ) ;
92
92
} ;
93
- } ( index , i , colorOn , colors ) ;
93
+ } ( index , color , colorOn ) ;
94
94
manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
95
95
} ;
96
- view . prototype . setColorInArrayElements = function ( index , i , colorOn ) {
97
- var forwardSteps = function ( index , i , colorOn , colors ) {
96
+ view . prototype . setColorInArrayElements = function ( index , color , colorOn ) {
97
+ var forwardSteps = function ( index , color , colorOn ) {
98
98
return function ( ) {
99
- setColors ( index , i , colorOn ) ;
99
+ setColors ( index , color , colorOn ) ;
100
100
} ;
101
- } ( index , i , colorOn , colors ) ;
102
- var backwardSteps = function ( index , i , colorOn , colors ) {
101
+ } ( index , color , colorOn ) ;
102
+ var backwardSteps = function ( index , color , colorOn ) {
103
103
return function ( ) {
104
- setColors ( index , i , ! colorOn ) ;
104
+ setColors ( index , color , ! colorOn ) ;
105
105
} ;
106
- } ( index , i , colorOn , colors ) ;
106
+ } ( index , color , colorOn ) ;
107
107
manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
108
108
} ;
109
109
view . prototype . pause = function ( ) {
110
110
if ( ! this . paused ) {
111
111
this . paused = true ;
112
112
manager . pause ( ) ;
113
+ $ ( '#backward' ) . removeAttr ( 'disabled' ) ;
114
+ $ ( '#forward' ) . removeAttr ( 'disabled' ) ;
113
115
$ ( "#togglePause" ) . html ( "Resume" ) ;
114
116
}
115
117
else {
116
118
this . paused = false ;
117
119
manager . unpause ( ) ;
120
+ $ ( '#backward' ) . attr ( 'disabled' , 'disabled' ) ;
121
+ $ ( '#forward' ) . attr ( 'disabled' , 'disabled' ) ;
118
122
$ ( "#togglePause" ) . html ( "Pause" ) ;
119
123
}
120
124
} ;
121
125
view . prototype . setPause = function ( ) {
122
126
this . paused = true ;
123
127
manager . pause ( ) ;
124
128
$ ( "#togglePause" ) . html ( "Start" ) ;
129
+ $ ( '#backward' ) . removeAttr ( 'disabled' ) ;
130
+ $ ( '#forward' ) . removeAttr ( 'disabled' ) ;
125
131
} ;
126
132
view . prototype . forward = function ( ) {
127
133
manager . next ( ) ;
128
134
} ;
129
135
view . prototype . backward = function ( ) {
130
136
manager . previous ( ) ;
131
137
} ;
138
+ view . prototype . slow = function ( ) {
139
+ manager . slow ( ) ;
140
+ } ;
141
+ view . prototype . medium = function ( ) {
142
+ manager . medium ( ) ;
143
+ } ;
144
+ view . prototype . fast = function ( ) {
145
+ manager . fast ( ) ;
146
+ } ;
132
147
return view ;
133
148
} ( ) ) ;
134
149
//Craete a global variable
0 commit comments