Begin d3 v4 update

This commit is contained in:
Tom MacWright
2016-08-12 10:29:00 -04:00
parent 36a90b4f86
commit cdb533fa84
137 changed files with 842 additions and 6691 deletions
+7 -4
View File
@@ -1,3 +1,6 @@
import { rebind } from '../../util/rebind';
import { getSetValue } from '../../util/get_set_value';
import * as d3 from 'd3';
import { t } from '../../util/locale';
import { nominatim as nominatimService } from '../../services/index';
import { phoneFormats } from '../../../data/index';
@@ -71,8 +74,8 @@ export function url(field, context) {
function change(onInput) {
return function() {
var t = {};
t[field.key] = input.value() || undefined;
dispatch.change(t, onInput);
t[field.key] = getSetValue(input) || undefined;
dispatch.call("change", this, t, onInput);
};
}
@@ -83,7 +86,7 @@ export function url(field, context) {
};
i.tags = function(tags) {
input.value(tags[field.key] || '');
getSetValue(input, tags[field.key] || '');
};
i.focus = function() {
@@ -91,5 +94,5 @@ export function url(field, context) {
if (node) node.focus();
};
return d3.rebind(i, dispatch, 'on');
return rebind(i, dispatch, 'on');
}