Merge pull request #101 from fhemberger/master

Check if Shower is already in slide/list mode
This commit is contained in:
Vadim Makeev 2012-12-30 00:35:33 -08:00
commit 88dc6c4957
1 changed files with 6 additions and 2 deletions

View File

@ -131,7 +131,9 @@ window.shower = (function(window, document, undefined) {
* @returns {number}
*/
shower.enterSlideMode = function() {
// @TODO: check if it's already in slide mode...
// check if it's already in slide mode...
if ( body.classList.contains('full') ) { return; }
body.classList.remove('list');
body.classList.add('full');
return shower._applyTransform(shower._getTransform());
@ -142,7 +144,9 @@ window.shower = (function(window, document, undefined) {
* @returns {number}
*/
shower.enterListMode = function() {
// @TODO: check if it's already in list mode...
// check if it's already in list mode...
if ( body.classList.contains('list') ) { return; }
body.classList.remove('full');
body.classList.add('list');
return shower._applyTransform('none');