From: Scott Worley Date: Fri, 28 Feb 2014 09:02:02 +0000 (-0800) Subject: Save per-pic exposures X-Git-Url: http://git.scottworley.com/picsort/commitdiff_plain/07f84670a9926d626ec4e21790e02fd56ff3dc8c?ds=sidebyside Save per-pic exposures --- diff --git a/picsorter.js b/picsorter.js index 808855b..abed507 100644 --- a/picsorter.js +++ b/picsorter.js @@ -15,6 +15,12 @@ var input_index = -1; function setpic() { + if ("exposure" in picinfo[files[input_index]]) { + exposure = picinfo[files[input_index]].exposure; + } else { + picinfo[files[input_index]].exposure = exposure; + localStorage.picsorter_picinfo = JSON.stringify(picinfo); + } $("#pic").attr("src", zoom + exposure + "/" + files[input_index]); } @@ -54,6 +60,7 @@ function mark_not_deleted() { function change_exposure(amount) { exposure += amount; + picinfo[files[input_index]].exposure = exposure; setpic(); var display_exposure = (exposure / 4) - 3.5; say((display_exposure >= 0 ? "+" : "") + display_exposure);