mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
- actionRestrictTurn will no longer "infer" the turn type - restrictionType *must* be passed in - this is ok because the only code we use this action (restrictions.js) already has inferred the type - this simplifies what the action actually does - moved the tests from restrict_turn.js that were really just testing the restriction type inferrence over to intersection.js (and added a few more tests for iD.osmInferRestriction)
14 lines
388 B
JavaScript
14 lines
388 B
JavaScript
import { actionDeleteRelation } from './delete_relation';
|
|
|
|
|
|
// `actionUnrestrictTurn` deletes a turn restriction relation.
|
|
//
|
|
// `turn` must be an `osmTurn` object with a `restrictionID` property.
|
|
// see osm/intersection.js, pathToTurn()
|
|
//
|
|
export function actionUnrestrictTurn(turn) {
|
|
return function(graph) {
|
|
return actionDeleteRelation(turn.restrictionID)(graph);
|
|
};
|
|
}
|