mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Convert some element ids to classes to avoid collisions when embedding iD
This commit is contained in:
@@ -205,11 +205,11 @@ export function uiFieldRestrictions(field, context) {
|
||||
|
||||
// Reflow warning: `utilGetDimensions` calls `getBoundingClientRect`
|
||||
// Instead of asking the restriction-container for its dimensions,
|
||||
// we can ask the #sidebar, which can have its dimensions cached.
|
||||
// we can ask the .sidebar, which can have its dimensions cached.
|
||||
// width: calc as sidebar - padding
|
||||
// height: hardcoded (from `80_app.css`)
|
||||
// var d = utilGetDimensions(selection);
|
||||
var sdims = utilGetDimensions(d3_select('#sidebar'));
|
||||
var sdims = utilGetDimensions(d3_select('.sidebar'));
|
||||
var d = [ sdims[0] - 50, 370 ];
|
||||
var c = geoVecScale(d, 0.5);
|
||||
var z = 22;
|
||||
@@ -407,7 +407,7 @@ export function uiFieldRestrictions(field, context) {
|
||||
var xPos = -1;
|
||||
|
||||
if (minChange) {
|
||||
xPos = utilGetDimensions(d3_select('#sidebar'))[0];
|
||||
xPos = utilGetDimensions(d3_select('.sidebar'))[0];
|
||||
}
|
||||
|
||||
if (!minChange || (minChange && Math.abs(xPos - _lastXPos) >= minChange)) {
|
||||
|
||||
Reference in New Issue
Block a user