Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.call(speedCombo)
.merge(input);
input
.on('change', change)
.on('blur', change);
var loc;
if (_entity.type === 'node') {
loc = _entity.loc;
} else {
var childNodes = context.graph().childNodes(context.entity(_entity.id));
loc = childNodes[~~(childNodes.length/2)].loc;
}
_isImperial = countryCoder.roadSpeedUnit(loc) === 'mph';
unitInput = wrap.selectAll('input.maxspeed-unit')
.data([0]);
unitInput = unitInput.enter()
.append('input')
.attr('type', 'text')
.attr('class', 'maxspeed-unit')
.call(unitCombo)
.merge(unitInput);
unitInput
.on('blur', changeUnits)
.on('change', changeUnits);