From eebd7dac37dfdfbae60cf7165887bb2ef0c831b2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 23 May 2013 17:28:00 +0400 Subject: [PATCH] several minor tweeks... Signed-off-by: Alex A. Naanou --- ui/data.js | 4 ++++ ui/keybindings3.js | 1 + 2 files changed, 5 insertions(+) diff --git a/ui/data.js b/ui/data.js index 88ef1386..65073a3d 100755 --- a/ui/data.js +++ b/ui/data.js @@ -52,6 +52,8 @@ var DATA = { // the needed data... // XXX should we split this out? var IMAGES = {} +// True if images is modified and needs saving... +var IMAGES_DIRTY = false var DATA_ATTR = 'DATA' @@ -924,6 +926,7 @@ function setupDataBindings(viewer){ DATA.current = getImageGID($(image)) }) + // basic image manipulation... // XXX after this we need to save the images... .on('rotatingLeft rotatingRight', function(evt, image){ @@ -933,6 +936,7 @@ function setupDataBindings(viewer){ var orientation = img.attr('orientation') IMAGES[gid].orientation = orientation + IMAGES_DIRTY = true }) }) diff --git a/ui/keybindings3.js b/ui/keybindings3.js index 08d0f218..33881d3e 100755 --- a/ui/keybindings3.js +++ b/ui/keybindings3.js @@ -198,6 +198,7 @@ var KEYBOARD_CONFIG = { S: { ctrl: doc('Save current state', function(){ + event.preventDefault() //saveLocalStorage() saveLocalStorageData() saveLocalStorageMarks()