mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Begin d3 v4 update
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user