Default TR to via-node only, use new key so everyone must re-choose

(closes #6922)
This commit is contained in:
Bryan Housel
2019-11-11 14:47:29 -05:00
parent 0462da65b6
commit 693661a658

View File

@@ -16,10 +16,12 @@ import { utilGetDimensions, utilSetDimensions } from '../../util/dimensions';
export function uiFieldRestrictions(field, context) {
var dispatch = d3_dispatch('change');
var breathe = behaviorBreathe(context);
var storedViaWay = context.storage('turn-restriction-via-way');
context.storage('turn-restriction-via-way', null); // remove old key
var storedViaWay = context.storage('turn-restriction-via-way0'); // use new key #6922
var storedDistance = context.storage('turn-restriction-distance');
var _maxViaWay = storedViaWay !== null ? (+storedViaWay) : 1;
var _maxViaWay = storedViaWay !== null ? (+storedViaWay) : 0;
var _maxDistance = storedDistance ? (+storedDistance) : 30;
var _initialized = false;
var _parent = d3_select(null); // the entire field
@@ -185,7 +187,7 @@ export function uiFieldRestrictions(field, context) {
var val = d3_select(this).property('value');
_maxViaWay = +val;
_container.selectAll('.layer-osm .layer-turns *').remove();
context.storage('turn-restriction-via-way', _maxViaWay);
context.storage('turn-restriction-via-way0', _maxViaWay);
_parent.call(restrictions);
});