From a88de5403c68e347c6d1e98f569391f6a50eea39 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 21 Sep 2013 06:07:59 +0400 Subject: [PATCH] removed cropped-mode CSS class to avoid sync errors and moved to isViewCropped() in checks... Signed-off-by: Alex A. Naanou --- ui/data.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/data.js b/ui/data.js index 7d1b116e..eb94f012 100755 --- a/ui/data.js +++ b/ui/data.js @@ -1647,14 +1647,17 @@ function showAllData(){ // // NOTE: This will add the toggler to CROP_MODES, for use by // uncropLastState(...) +// NOTE: crop modes are exclusive -- it is not possible to enter one crop +// mode from a different crop mode function makeCropModeToggler(cls, crop){ var res = createCSSClassToggler( '.viewer', - cls + ' cropped-mode', + //cls + ' cropped-mode', + cls, function(action){ // prevent mixing marked-only and single-ribbon modes... if(action == 'on' - && $('.viewer').hasClass('cropped-mode') + && isViewCropped() && res('?') != 'on'){ return false } @@ -1679,7 +1682,7 @@ function makeCropModeToggler(cls, crop){ // NOTE: this will exit all crop modes when uncropping the last step. function uncropLastState(){ // do nothing if we aren't in a crop mode... - if(!$('.viewer').hasClass('cropped-mode')){ + if(!isViewCropped()){ return }