Touch targets can be keyed on entity.id instead of osmEntity.key

to avoid excessive exit/enter flickering
This commit is contained in:
Bryan Housel
2017-12-15 21:26:58 -05:00
parent ba7437b4cc
commit 9d42d470ca
+1 -1
View File
@@ -174,7 +174,7 @@ export function svgVertices(projection, context) {
var debugClass = 'pink';
var targets = selection.selectAll('.target')
.filter(filter)
.data(entities, osmEntity.key);
.data(entities, function key(d) { return d.id; });
// exit
targets.exit()