Store flag on _parentWays itself, fixes #392

Relying here on the fact that `calculated` will never
collide with an actual entity ID.
This commit is contained in:
John Firebaugh
2013-01-12 10:55:18 -08:00
parent ea3b7baf14
commit 6e044f3607

View File

@@ -41,7 +41,7 @@ iD.Graph.prototype = {
ent,
id;
if (!graph.calculatedParentWays) {
if (!this._parentWays.calculated) {
for (var i in graph.entities) {
ent = graph.entities[i];
if (ent && ent.type === 'way') {
@@ -54,7 +54,7 @@ iD.Graph.prototype = {
}
}
}
graph.calculatedParentWays = true;
this._parentWays.calculated = true;
}
return this._parentWays[entity.id] || [];