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', 'marked-only-view cropped-mode',
function(action){ function(action){
// prevent mixing marked-only and single-ribbon modes... // prevent mixing marked-only and single-ribbon modes...
// XXX is there a more generic way to do this??? if(action == 'on'
// ..without including direct mode dependencies? && $('.viewer').hasClass('cropped-mode')
if(action == 'on' && toggleSingleRibbonMode('?') == 'on'){ && toggleMarkedOnlyView('?') != 'on'){
return false return false
} }
}, },

View File

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