Commit 88dc6c49 authored by Vadim Makeev's avatar Vadim Makeev

Merge pull request #101 from fhemberger/master

Check if Shower is already in slide/list mode
parents bcaeb91c 3d414b19
...@@ -131,7 +131,9 @@ window.shower = (function(window, document, undefined) { ...@@ -131,7 +131,9 @@ window.shower = (function(window, document, undefined) {
* @returns {number} * @returns {number}
*/ */
shower.enterSlideMode = function() { 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.remove('list');
body.classList.add('full'); body.classList.add('full');
return shower._applyTransform(shower._getTransform()); return shower._applyTransform(shower._getTransform());
...@@ -142,7 +144,9 @@ window.shower = (function(window, document, undefined) { ...@@ -142,7 +144,9 @@ window.shower = (function(window, document, undefined) {
* @returns {number} * @returns {number}
*/ */
shower.enterListMode = function() { 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.remove('full');
body.classList.add('list'); body.classList.add('list');
return shower._applyTransform('none'); return shower._applyTransform('none');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment