mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Update projection arg for d3.geoPath(), deprecate d3.geoClipExtent()
This commit is contained in:
@@ -24,7 +24,7 @@ export function svgDebug(projection, context) {
|
||||
showsImagery = context.getDebug('imagery'),
|
||||
showsImperial = context.getDebug('imperial'),
|
||||
showsDriveLeft = context.getDebug('driveLeft'),
|
||||
path = d3.geoPath().projection(projection);
|
||||
path = d3.geoPath(projection);
|
||||
|
||||
|
||||
var debugData = [];
|
||||
|
||||
@@ -68,8 +68,7 @@ export function svgGpx(projection, context, dispatch) {
|
||||
.merge(paths);
|
||||
|
||||
|
||||
var path = d3.geoPath()
|
||||
.projection(projection);
|
||||
var path = d3.geoPath(projection);
|
||||
|
||||
paths
|
||||
.attr('d', path);
|
||||
|
||||
@@ -14,7 +14,7 @@ import { utilDisplayName, utilEntitySelector } from '../util/index';
|
||||
|
||||
|
||||
export function svgLabels(projection, context) {
|
||||
var path = d3.geoPath().projection(projection),
|
||||
var path = d3.geoPath(projection),
|
||||
detected = utilDetect(),
|
||||
baselineHack = (detected.ie || detected.browser.toLowerCase() === 'edge'),
|
||||
rdrawn = rbush(),
|
||||
@@ -236,7 +236,7 @@ export function svgLabels(projection, context) {
|
||||
.merge(debugboxes);
|
||||
|
||||
debugboxes
|
||||
.attr('d', d3.geoPath().projection(null));
|
||||
.attr('d', d3.geoPath());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export function svgOneWaySegments(projection, graph, dt) {
|
||||
i = 0,
|
||||
offset = dt,
|
||||
segments = [],
|
||||
clip = d3.geoClipExtent().extent(projection.clipExtent()).stream,
|
||||
clip = d3.geoIdentity().clipExtent(projection.clipExtent()).stream,
|
||||
coordinates = graph.childNodes(entity).map(function(n) {
|
||||
return n.loc;
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as d3 from 'd3';
|
||||
|
||||
export function svgPath(projection, graph, polygon) {
|
||||
var cache = {},
|
||||
clip = d3.geoClipExtent().extent(projection.clipExtent()).stream,
|
||||
clip = d3.geoIdentity().clipExtent(projection.clipExtent()).stream,
|
||||
project = projection.stream,
|
||||
path = d3.geoPath()
|
||||
.projection({stream: function(output) { return polygon ? project(output) : project(clip(output)); }});
|
||||
|
||||
@@ -237,7 +237,7 @@ export function uiMapInMap(context) {
|
||||
|
||||
// redraw viewport bounding box
|
||||
if (gesture !== 'pan') {
|
||||
var getPath = d3.geoPath().projection(projection),
|
||||
var getPath = d3.geoPath(projection),
|
||||
bbox = { type: 'Polygon', coordinates: [context.map().extent().polygon()] };
|
||||
|
||||
viewport = wrap.selectAll('.map-in-map-viewport')
|
||||
|
||||
Reference in New Issue
Block a user