From 5a4525f86eb3ad58660b96bda68401d8a8bc5150 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 5 Jun 2016 06:27:54 +0300 Subject: [PATCH] cleanup... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/location.js | 11 +++++++---- ui (gen4)/features/recover.js | 6 ------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ui (gen4)/features/location.js b/ui (gen4)/features/location.js index 3acfeb21..adeeac72 100755 --- a/ui (gen4)/features/location.js +++ b/ui (gen4)/features/location.js @@ -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 }], ], }) diff --git a/ui (gen4)/features/recover.js b/ui (gen4)/features/recover.js index c2c4a811..d5794859 100755 --- a/ui (gen4)/features/recover.js +++ b/ui (gen4)/features/recover.js @@ -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