@@ -80,55 +80,70 @@ var view = /** @class */ (function () {
8080 } ( element , back ) ;
8181 manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
8282 } ;
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 ) {
8585 return function ( ) {
86- setColor ( index , i , colorOn ) ;
86+ setColor ( index , color , colorOn ) ;
8787 } ;
88- } ( index , i , colorOn , colors ) ;
89- var backwardSteps = function ( index , i , colorOn , colors ) {
88+ } ( index , color , colorOn ) ;
89+ var backwardSteps = function ( index , color , colorOn ) {
9090 return function ( ) {
91- setColor ( index , i , ! colorOn ) ;
91+ setColor ( index , color , ! colorOn ) ;
9292 } ;
93- } ( index , i , colorOn , colors ) ;
93+ } ( index , color , colorOn ) ;
9494 manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
9595 } ;
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 ) {
9898 return function ( ) {
99- setColors ( index , i , colorOn ) ;
99+ setColors ( index , color , colorOn ) ;
100100 } ;
101- } ( index , i , colorOn , colors ) ;
102- var backwardSteps = function ( index , i , colorOn , colors ) {
101+ } ( index , color , colorOn ) ;
102+ var backwardSteps = function ( index , color , colorOn ) {
103103 return function ( ) {
104- setColors ( index , i , ! colorOn ) ;
104+ setColors ( index , color , ! colorOn ) ;
105105 } ;
106- } ( index , i , colorOn , colors ) ;
106+ } ( index , color , colorOn ) ;
107107 manager . addEvent ( new FrontendEvent ( forwardSteps , backwardSteps , this . animSpeed ) ) ;
108108 } ;
109109 view . prototype . pause = function ( ) {
110110 if ( ! this . paused ) {
111111 this . paused = true ;
112112 manager . pause ( ) ;
113+ $ ( '#backward' ) . removeAttr ( 'disabled' ) ;
114+ $ ( '#forward' ) . removeAttr ( 'disabled' ) ;
113115 $ ( "#togglePause" ) . html ( "Resume" ) ;
114116 }
115117 else {
116118 this . paused = false ;
117119 manager . unpause ( ) ;
120+ $ ( '#backward' ) . attr ( 'disabled' , 'disabled' ) ;
121+ $ ( '#forward' ) . attr ( 'disabled' , 'disabled' ) ;
118122 $ ( "#togglePause" ) . html ( "Pause" ) ;
119123 }
120124 } ;
121125 view . prototype . setPause = function ( ) {
122126 this . paused = true ;
123127 manager . pause ( ) ;
124128 $ ( "#togglePause" ) . html ( "Start" ) ;
129+ $ ( '#backward' ) . removeAttr ( 'disabled' ) ;
130+ $ ( '#forward' ) . removeAttr ( 'disabled' ) ;
125131 } ;
126132 view . prototype . forward = function ( ) {
127133 manager . next ( ) ;
128134 } ;
129135 view . prototype . backward = function ( ) {
130136 manager . previous ( ) ;
131137 } ;
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+ } ;
132147 return view ;
133148} ( ) ) ;
134149//Craete a global variable
0 commit comments