mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 01:24:05 +02:00
get validaiton objects on context
ref #remote-presets
This commit is contained in:
+14
-2
@@ -41,9 +41,11 @@ import { utilDetect } from '../util/detect';
|
||||
import {
|
||||
utilCallWhenIdle,
|
||||
utilRebind,
|
||||
utilExternalPresets
|
||||
utilExternalPresets,
|
||||
utilExternalValidationRules
|
||||
} from '../util';
|
||||
|
||||
import { validationCollection } from '../validations';
|
||||
|
||||
export var areaKeys = {};
|
||||
|
||||
@@ -494,11 +496,21 @@ export function coreContext() {
|
||||
|
||||
background.init();
|
||||
features.init();
|
||||
|
||||
// get external data if directed by query parameters
|
||||
if (utilExternalPresets()) {
|
||||
presets.fromExternal();
|
||||
} else {
|
||||
presets.init();
|
||||
}
|
||||
}
|
||||
|
||||
if (utilExternalValidationRules()) {
|
||||
var validations = validationCollection();
|
||||
validations.init(function(rules) {
|
||||
context.validationRules = function() { return rules; };
|
||||
});
|
||||
}
|
||||
|
||||
areaKeys = presets.areaKeys();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user