mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 09:34:04 +02:00
Convert some element ids to classes to avoid collisions when embedding iD
This commit is contained in:
@@ -445,7 +445,7 @@ export function modeDragNode(context) {
|
||||
|
||||
var drag = behaviorDrag()
|
||||
.selector('.layer-touch.points .target')
|
||||
.surface(d3_select('#map').node())
|
||||
.surface(d3_select('.main-map').node())
|
||||
.origin(origin)
|
||||
.on('start', start)
|
||||
.on('move', move)
|
||||
|
||||
@@ -107,7 +107,7 @@ export function modeDragNote(context) {
|
||||
|
||||
var drag = behaviorDrag()
|
||||
.selector('.layer-touch.markers .target.note.new')
|
||||
.surface(d3_select('#map').node())
|
||||
.surface(d3_select('.main-map').node())
|
||||
.origin(origin)
|
||||
.on('start', start)
|
||||
.on('move', move)
|
||||
|
||||
@@ -69,7 +69,7 @@ export function svgGeolocate(projection) {
|
||||
|
||||
pointsEnter
|
||||
.append('circle')
|
||||
.attr('id', 'geolocate-radius')
|
||||
.attr('class', 'geolocate-radius')
|
||||
.attr('dx', '0')
|
||||
.attr('dy', '0')
|
||||
.attr('fill', 'rgb(15,128,225)')
|
||||
@@ -88,7 +88,7 @@ export function svgGeolocate(projection) {
|
||||
groups.merge(pointsEnter)
|
||||
.attr('transform', transform);
|
||||
|
||||
d3_select('#geolocate-radius').attr('r', accuracy(_position.coords.accuracy, geolocation.loc));
|
||||
layer.select('.geolocate-radius').attr('r', accuracy(_position.coords.accuracy, geolocation.loc));
|
||||
}
|
||||
|
||||
function drawLocation(selection) {
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ export function uiInit(context) {
|
||||
|
||||
content
|
||||
.append('div')
|
||||
.attr('id', 'map')
|
||||
.attr('class', 'main-map')
|
||||
.attr('dir', 'ltr')
|
||||
.call(map);
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ export function uiIntro(context) {
|
||||
let zoom = context.map().zoom();
|
||||
let background = context.background().baseLayerSource();
|
||||
let overlays = context.background().overlayLayerSources();
|
||||
let opacity = d3_selectAll('#map .layer-background').style('opacity');
|
||||
let opacity = d3_selectAll('.main-map .layer-background').style('opacity');
|
||||
let caches = osm && osm.caches();
|
||||
let baseEntities = context.history().graph().base().entities;
|
||||
|
||||
@@ -109,7 +109,7 @@ export function uiIntro(context) {
|
||||
});
|
||||
|
||||
|
||||
d3_selectAll('#map .layer-background').style('opacity', 1);
|
||||
d3_selectAll('.main-map .layer-background').style('opacity', 1);
|
||||
|
||||
let curtain = uiCurtain();
|
||||
selection.call(curtain);
|
||||
@@ -156,7 +156,7 @@ export function uiIntro(context) {
|
||||
|
||||
curtain.remove();
|
||||
navwrap.remove();
|
||||
d3_selectAll('#map .layer-background').style('opacity', opacity);
|
||||
d3_selectAll('.main-map .layer-background').style('opacity', opacity);
|
||||
d3_selectAll('button.sidebar-toggle').classed('disabled', false);
|
||||
if (osm) { osm.toggle(true).reset().caches(caches); }
|
||||
context.history().reset().merge(Object.values(baseEntities));
|
||||
|
||||
Reference in New Issue
Block a user