Inter-require iD instead of relying on the global (#3256)

This commit is contained in:
Tom MacWright
2016-07-19 10:30:50 -04:00
committed by GitHub
parent 7ca6d06254
commit 3856b1ff2f
2 changed files with 5 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import * as Validations from '../validations/index';
import { Difference } from './difference';
import { Entity } from './entity';
import { Graph } from './graph';
@@ -172,7 +173,7 @@ export function History(context) {
},
validate: function(changes) {
return _(iD.validations)
return _(Validations)
.map(function(fn) { return fn()(changes, stack[index].graph); })
.flatten()
.value();

View File

@@ -1,3 +1,5 @@
import { Reverse } from '../actions/reverse';
// For fixing up rendering of multipolygons with tags on the outer member.
// https://github.com/openstreetmap/iD/issues/613
export function isSimpleMultipolygonOuterMember(entity, graph) {
@@ -81,7 +83,7 @@ export function joinWays(array, graph) {
}
function reverse(member) {
return member.tags ? iD.actions.Reverse(member.id, {reverseOneway: true})(graph).entity(member.id) : member;
return member.tags ? Reverse(member.id, {reverseOneway: true})(graph).entity(member.id) : member;
}
while (array.length) {