made current crop modes a bit more generic...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-09-21 05:26:18 +04:00
parent bceab7b4e7
commit fa64b51e89
2 changed files with 6 additions and 6 deletions

View File

@ -51,9 +51,9 @@ var toggleMarkedOnlyView = createCSSClassToggler(
'marked-only-view cropped-mode',
function(action){
// prevent mixing marked-only and single-ribbon modes...
// XXX is there a more generic way to do this???
// ..without including direct mode dependencies?
if(action == 'on' && toggleSingleRibbonMode('?') == 'on'){
if(action == 'on'
&& $('.viewer').hasClass('cropped-mode')
&& toggleMarkedOnlyView('?') != 'on'){
return false
}
},

View File

@ -178,9 +178,9 @@ var toggleSingleRibbonMode = createCSSClassToggler(
'single-ribbon-mode cropped-mode',
function(action){
// prevent mixing marked-only and single-ribbon modes...
// XXX is there a more generic way to do this???
// ..without including direct mode dependencies?
if(action == 'on' && toggleMarkedOnlyView('?') == 'on'){
if(action == 'on'
&& $('.viewer').hasClass('cropped-mode')
&& toggleSingleRibbonMode('?') != 'on'){
return false
}
},