osmInferRestriction can just take a turn, instead of from/to

This is better because it makes explicit that osmInferRestriction
needs an actual turn now (from/to with vertex, etc)
This commit is contained in:
Bryan Housel
2018-02-16 13:27:23 -05:00
parent b84b64c79c
commit d940200ef0
3 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -347,7 +347,7 @@ export function uiFieldRestrictions(field, context) {
} else if (datum instanceof osmTurn) {
var actions;
datum.restriction = osmInferRestriction(vgraph, datum.from, datum.to, projection);
datum.restriction = osmInferRestriction(vgraph, datum, projection);
if (datum.restrictionID && !datum.direct) {
return;
@@ -436,7 +436,7 @@ export function uiFieldRestrictions(field, context) {
var fromWayID = datum.from.way;
var viaWayIDs = datum.via.ways;
var toWayID = datum.to.way;
var restrictionType = osmInferRestriction(vgraph, datum.from, datum.to, projection);
var restrictionType = osmInferRestriction(vgraph, datum, projection);
var turnType = {
'no_left_turn': 'Left Turn',