* (Internal) returns the correct CSS for changing the bar's * position given an n percentage, and speed and ease from Settings
(n, speed, ease)
| 319 | */ |
| 320 | |
| 321 | function barPositionCSS(n, speed, ease) { |
| 322 | var barCSS; |
| 323 | |
| 324 | if (Settings.positionUsing === 'translate3d') { |
| 325 | barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' }; |
| 326 | } else if (Settings.positionUsing === 'translate') { |
| 327 | barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' }; |
| 328 | } else { |
| 329 | barCSS = { 'margin-left': toBarPerc(n)+'%' }; |
| 330 | } |
| 331 | |
| 332 | barCSS.transition = 'all '+speed+'ms '+ease; |
| 333 | |
| 334 | return barCSS; |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * (Internal) Queues a function to be executed. |