mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9125e1760b
commit
5a4525f86e
@ -87,6 +87,8 @@ var LocationActions = actions.Actions({
|
||||
// NOTE: this is almost the same as .location = location but
|
||||
// here we can access the call return value.
|
||||
//
|
||||
// NOTE: .location will be set by the .load handler...
|
||||
//
|
||||
// XXX not sure about where to set the .__location -- see inside...
|
||||
loadLocation: ['File/Load location',
|
||||
function(location){
|
||||
@ -120,7 +122,7 @@ var LocationActions = actions.Actions({
|
||||
|
||||
|
||||
// XXX ???
|
||||
this.__location = location
|
||||
//this.__location = location
|
||||
|
||||
// NOTE: the method should set the proper location if it uses .clear()...
|
||||
var res = method && this[method](path)
|
||||
@ -187,9 +189,10 @@ module.Location = core.ImageGridFeatures.Feature({
|
||||
}],
|
||||
['load',
|
||||
function(_, data){
|
||||
if(data.location){
|
||||
this.__location = data.location
|
||||
}
|
||||
// NOTE: we are setting this after the load because the
|
||||
// loader may .clear() the viewer, thus clearing the
|
||||
// .location too...
|
||||
this.__location = data.location
|
||||
}],
|
||||
],
|
||||
})
|
||||
|
||||
@ -30,8 +30,6 @@ var RecoverActions = actions.Actions({
|
||||
// NOTE: for more info on the load protocol see: base.BaseActions.load
|
||||
load: [
|
||||
function(data){
|
||||
var location = data.location
|
||||
|
||||
// prepare to recover, just in case...
|
||||
this.__recover = (this.__recover !== false
|
||||
&& this.config['recover-load-errors-to-previous-location']) ?
|
||||
@ -39,10 +37,6 @@ var RecoverActions = actions.Actions({
|
||||
: false
|
||||
|
||||
return function(){
|
||||
// NOTE: we are setting this after the load because the
|
||||
// loader may .clear() the viewer, thus clearing the
|
||||
// .location too...
|
||||
this.__location = location
|
||||
|
||||
// all went well clear the recovery data...
|
||||
delete this.__recover
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user