Skip to content

Commit

Permalink
Allow to disable retrieval in morph config
Browse files Browse the repository at this point in the history
Set "noRetrieval" : true in a config file to do this.
  • Loading branch information
LFDM committed May 29, 2014
1 parent 9da3911 commit ae2712e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions app/js/arethusa.morph/morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ angular.module('arethusa.morph').service('morph', [
var props = [
'postagSchema',
'attributes',
'styledThrough'
'styledThrough',
'noRetrieval'
];
configurator.getConfAndDelegate('morph', self, props);
self.analyses = {};
Expand Down Expand Up @@ -142,11 +143,13 @@ angular.module('arethusa.morph').service('morph', [

this.loadInitalAnalyses = function () {
var analyses = self.seedAnalyses(state.tokens);
angular.forEach(analyses, function (val, id) {
self.getExternalAnalyses(val);
self.getAnalysisFromState(val, id);
val.analyzed = true;
});
if (! self.noRetrieval) {
angular.forEach(analyses, function (val, id) {
self.getExternalAnalyses(val);
self.getAnalysisFromState(val, id);
val.analyzed = true;
});
}
return analyses;
};

Expand Down

0 comments on commit ae2712e

Please sign in to comment.