mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 14:23:38 +02:00
@@ -138,13 +138,18 @@ iD.Map = function(context) {
|
||||
}
|
||||
|
||||
surface
|
||||
.call(points)
|
||||
.call(vertices, graph, all, filter, map.extent(), map.zoom())
|
||||
.call(lines, graph, all, filter)
|
||||
.call(areas, graph, all, filter)
|
||||
.call(midpoints, graph, all, filter, map.extent())
|
||||
.call(labels, graph, all, filter, dimensions, !difference && !extent);
|
||||
|
||||
if (points.points(context.intersects(map.extent())).length > 100) {
|
||||
surface.select('.layer-hit').selectAll('g.point').remove();
|
||||
} else {
|
||||
surface.call(points, points.points(all), filter);
|
||||
}
|
||||
|
||||
dispatch.drawn({full: true});
|
||||
}
|
||||
|
||||
|
||||
+3
-9
@@ -10,16 +10,11 @@ iD.svg.Points = function(projection, context) {
|
||||
return b.loc[1] - a.loc[1];
|
||||
}
|
||||
|
||||
function drawPoints(surface, points) {
|
||||
points = points || drawPoints.points();
|
||||
|
||||
if (points.length > 100) {
|
||||
return surface.select('.layer-hit').selectAll('g.point').remove();
|
||||
}
|
||||
|
||||
function drawPoints(surface, points, filter) {
|
||||
points.sort(sortY);
|
||||
|
||||
var groups = surface.select('.layer-hit').selectAll('g.point')
|
||||
.filter(filter)
|
||||
.data(points, iD.Entity.key);
|
||||
|
||||
var group = groups.enter()
|
||||
@@ -55,9 +50,8 @@ iD.svg.Points = function(projection, context) {
|
||||
.remove();
|
||||
}
|
||||
|
||||
drawPoints.points = function() {
|
||||
drawPoints.points = function(entities) {
|
||||
var graph = context.graph(),
|
||||
entities = context.intersects(context.extent()),
|
||||
points = [];
|
||||
|
||||
for (var i = 0; i < entities.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user