mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
some refactoring + bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
58ca38619d
commit
bd9027094b
@ -170,8 +170,7 @@ var AppControlActions = actions.Actions({
|
||||
|
||||
var base = image.base_path || this.location.path
|
||||
var filename = image.path
|
||||
|
||||
path = pathlib.normalize(base + '/' + filename)
|
||||
var path = pathlib.normalize(base + '/' + filename)
|
||||
|
||||
nw.Shell.showItemInFolder(path)
|
||||
}],
|
||||
|
||||
@ -348,15 +348,15 @@ var ImageMarkEditActions = actions.Actions({
|
||||
shiftMarked('down')],
|
||||
|
||||
// XXX undo...
|
||||
shiftMarkedAfter: ['Mark|Ribbon/Shift marked after image',
|
||||
shiftMarkedAfter: ['Mark|Ribbon/Shift marked after',
|
||||
{browseMode: 'cropMarked'},
|
||||
function(target){
|
||||
this.shiftMarkedTo(this.marked, target || 'current', 'after') }],
|
||||
this.shiftImageTo(this.marked, target || 'current', 'after') }],
|
||||
// XXX undo...
|
||||
shiftMarkedBefore: ['Mark|Ribbon/Shift marked before image',
|
||||
shiftMarkedBefore: ['Mark|Ribbon/Shift marked before',
|
||||
{browseMode: 'cropMarked'},
|
||||
function(target){
|
||||
this.shiftMarkedTo(this.marked, target || 'current', 'before') }],
|
||||
this.shiftImageTo(this.marked, target || 'current', 'before') }],
|
||||
})
|
||||
|
||||
var ImageEditMarks =
|
||||
|
||||
@ -4,19 +4,19 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
// XXX this is a hack...
|
||||
// ...need a way to escape these so as not to load them in browser...
|
||||
if(typeof(process) != 'undefined'){
|
||||
var fs = require('fs')
|
||||
var path = require('path')
|
||||
var exiftool = require('exiftool')
|
||||
}
|
||||
|
||||
|
||||
((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)
|
||||
(function(require){ var module={} // make module AMD/node compatible...
|
||||
/*********************************************************************/
|
||||
|
||||
// XXX this is a hack...
|
||||
// ...need a way to escape these so as not to load them in browser...
|
||||
if(typeof(process) != 'undefined'){
|
||||
var fs = requirejs('fs')
|
||||
var path = requirejs('path')
|
||||
var exiftool = requirejs('exiftool')
|
||||
}
|
||||
|
||||
|
||||
var util = require('lib/util')
|
||||
var toggler = require('lib/toggler')
|
||||
var tasks = require('lib/tasks')
|
||||
@ -168,7 +168,7 @@ var MetadataReaderActions = actions.Actions({
|
||||
}],
|
||||
|
||||
// XXX STUB: add support for this to .readMetadata(..)
|
||||
readAllMetadata: ['- Image/Read all metadata',
|
||||
readAllMetadata: ['File/Read all metadata',
|
||||
function(){
|
||||
var that = this
|
||||
// XXX make this a global API...
|
||||
|
||||
@ -770,6 +770,9 @@ module.ShiftAnimation = core.ImageGridFeatures.Feature({
|
||||
depends: [
|
||||
'ui-ribbons-render',
|
||||
],
|
||||
// NOTE: this will allow the animations to start as early as possible
|
||||
// in the action call...
|
||||
priority: 'high',
|
||||
|
||||
config: {
|
||||
// XXX make this duration...
|
||||
|
||||
@ -338,6 +338,10 @@ module.SingleImageView = core.ImageGridFeatures.Feature({
|
||||
actions: SingleImageActions,
|
||||
|
||||
handlers:[
|
||||
['load.pre',
|
||||
function(){
|
||||
this.toggleSingleImage('?') == 'on'
|
||||
&& this.toggleSingleImage('off') }],
|
||||
// update config...
|
||||
//['resizing.post',
|
||||
['resizingDone resizingWindow',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user