mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 11:50:07 +00:00
house keeping and cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8c2dab109d
commit
12979718f6
@ -279,7 +279,7 @@ var KEYBOARD_CONFIG = {
|
||||
|
||||
Esc: doc('Hide marks',
|
||||
function(){
|
||||
toggleMarkesView('off')
|
||||
toggleMarksView('off')
|
||||
return false
|
||||
}),
|
||||
},
|
||||
@ -490,7 +490,7 @@ var KEYBOARD_CONFIG = {
|
||||
}),
|
||||
alt: doc('Shift marked images up',
|
||||
function(){
|
||||
toggleMarkesView('on')
|
||||
toggleMarksView('on')
|
||||
shiftMarkedImagesUp()
|
||||
}),
|
||||
'alt+shift': doc('Shift marked images up to empty ribbon',
|
||||
@ -519,7 +519,7 @@ var KEYBOARD_CONFIG = {
|
||||
}),
|
||||
alt: doc('Shift marked images down',
|
||||
function(){
|
||||
toggleMarkesView('on')
|
||||
toggleMarksView('on')
|
||||
shiftMarkedImagesDown()
|
||||
}),
|
||||
'alt+shift': doc('Shift marked images down to empty ribbon',
|
||||
@ -685,12 +685,12 @@ var KEYBOARD_CONFIG = {
|
||||
|
||||
ctrl: doc('Mark current ribbon',
|
||||
function(){
|
||||
toggleMarkesView('on')
|
||||
toggleMarksView('on')
|
||||
markAll('ribbon')
|
||||
}),
|
||||
'ctrl+shift': doc('Mark all images',
|
||||
function(){
|
||||
toggleMarkesView('on')
|
||||
toggleMarksView('on')
|
||||
markAll('all')
|
||||
}),
|
||||
},
|
||||
@ -715,7 +715,7 @@ var KEYBOARD_CONFIG = {
|
||||
|
||||
// XXX add a non FXX key for macs...
|
||||
F2: doc('Toggle mark visibility',
|
||||
function(){ toggleMarkesView() }),
|
||||
function(){ toggleMarksView() }),
|
||||
// XXX should we be able to toggle crop modes from single image mode???
|
||||
// ...if yes, then remove the F2 & F3 definitions form ribbon
|
||||
// mode...
|
||||
@ -723,7 +723,7 @@ var KEYBOARD_CONFIG = {
|
||||
/*
|
||||
F2: {
|
||||
default: doc('Toggle mark visibility',
|
||||
function(){ toggleMarkesView() }),
|
||||
function(){ toggleMarksView() }),
|
||||
shift: doc('Crop marked only images',
|
||||
function(){
|
||||
toggleMarkedOnlyView('on')
|
||||
|
||||
13
ui/marks.js
13
ui/marks.js
@ -87,14 +87,12 @@ var getMarkedGIDBefore = makeGIDBeforeGetterFromList(
|
||||
// - 'off' : force remove mark
|
||||
// - 'next' : toggle next state (default)
|
||||
// NOTE: when passing this a gid, the 'next' action is not supported
|
||||
//
|
||||
// XXX do we need a pre-callback here???
|
||||
function makeMarkToggler(img_class, mark_class, evt_name, callback){
|
||||
return createCSSClassToggler(
|
||||
'.current.image',
|
||||
img_class,
|
||||
function(action, elem){
|
||||
toggleMarkesView('on')
|
||||
toggleMarksView('on')
|
||||
|
||||
// we got a gid...
|
||||
if(elem.length == 0 && elem.selector in IMAGES){
|
||||
@ -125,7 +123,7 @@ function makeMarkToggler(img_class, mark_class, evt_name, callback){
|
||||
}
|
||||
|
||||
|
||||
// generate an image updater function...
|
||||
// Generate an image updater function...
|
||||
//
|
||||
// the resulting function will update image mark state by adding or
|
||||
// removing the mark the specific mark object.
|
||||
@ -191,7 +189,7 @@ var toggleMarkedOnlyWithRibbonsView = makeCropModeToggler(
|
||||
|
||||
|
||||
// XXX shifting images and unmarking in this mode do not work correctly...
|
||||
var toggleMarkesView = createCSSClassToggler(
|
||||
var toggleMarksView = createCSSClassToggler(
|
||||
'.viewer',
|
||||
'marks-visible',
|
||||
function(){
|
||||
@ -468,7 +466,7 @@ function shiftMarkedImagesRight(){
|
||||
}
|
||||
|
||||
|
||||
// focus next/prev mark...
|
||||
// Focus next/prev mark...
|
||||
//
|
||||
// NOTE: these will not jump to marks on other ribbons... to prevent this
|
||||
// add true as the final argument (see restrict_to_ribbon argument
|
||||
@ -579,7 +577,6 @@ var loadFileMarks = makeFileLoader(
|
||||
var t1 = Date.now()
|
||||
marksUpdated()
|
||||
|
||||
// XXX is this the correct way to do this???
|
||||
DATA.version = DATA_VERSION
|
||||
dataUpdated()
|
||||
|
||||
@ -620,7 +617,7 @@ function setupMarks(viewer){
|
||||
showGlobalIndicator(
|
||||
'marks-visible',
|
||||
'Marks visible (F2)')
|
||||
.click(function(){ toggleMarkesView() })
|
||||
.click(function(){ toggleMarksView() })
|
||||
showGlobalIndicator(
|
||||
'marked-only-visible',
|
||||
'Marked only images visible (shift-F2)')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user