mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 17:00:35 +02:00
Remove code attempting to extend leaf ways
(closes #4869) It was causing more rendering issues than it was solving
This commit is contained in:
@@ -13,8 +13,7 @@ import { coreGraph } from '../core';
|
||||
|
||||
import {
|
||||
geoAngle,
|
||||
geoSphericalDistance,
|
||||
geoVecInterp
|
||||
geoSphericalDistance
|
||||
} from '../geo';
|
||||
|
||||
import { osmEntity } from './entity';
|
||||
@@ -334,26 +333,6 @@ export function osmIntersection(graph, startVertexId, maxDistance) {
|
||||
.map(function(way) { return vgraph.entity(way.id); });
|
||||
|
||||
|
||||
// STEP 8: Extend leaf ways, so they don't end within the viewer
|
||||
ways.forEach(function(way) {
|
||||
var n1, n2;
|
||||
if (way.__via) return; // not a leaf
|
||||
if (way.__first) {
|
||||
n1 = vgraph.entity(way.nodes[way.nodes.length - 2]);
|
||||
n2 = vgraph.entity(way.nodes[way.nodes.length - 1]);
|
||||
} else {
|
||||
n1 = vgraph.entity(way.nodes[1]);
|
||||
n2 = vgraph.entity(way.nodes[0]);
|
||||
}
|
||||
|
||||
if (n1.loc && n2.loc && vgraph.parentWays(n2).length === 1) {
|
||||
var toLoc = geoVecInterp(n1.loc, n2.loc, 10); // extend 1000%
|
||||
n2 = n2.move(toLoc);
|
||||
vgraph = vgraph.replace(n2);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// OK! Here is our intersection..
|
||||
var intersection = {
|
||||
graph: vgraph,
|
||||
|
||||
Reference in New Issue
Block a user