diff --git a/css/app.css b/css/app.css index 3781457a2..a8066927a 100644 --- a/css/app.css +++ b/css/app.css @@ -18,7 +18,7 @@ body { font-size: 15px; } -#id-container { +.id-container { height: 100%; width: 100%; position: fixed; diff --git a/js/id/behavior/lasso.js b/js/id/behavior/lasso.js index dcf88a77c..e334eba64 100644 --- a/js/id/behavior/lasso.js +++ b/js/id/behavior/lasso.js @@ -23,7 +23,7 @@ iD.behavior.Lasso = function(context) { function mousemove() { if (!lasso) { - lasso = iD.ui.Lasso().a(mouse); + lasso = iD.ui.Lasso(context).a(mouse); context.surface().call(lasso); } diff --git a/js/id/id.js b/js/id/id.js index a1cb3e459..91d69e45b 100644 --- a/js/id/id.js +++ b/js/id/id.js @@ -126,6 +126,7 @@ window.iD = function () { context.container = function(_) { if (!arguments.length) return container; container = _; + container.classed('id-container', true); return context; }; diff --git a/js/id/ui/lasso.js b/js/id/ui/lasso.js index 68ba5aec6..d57d64f02 100644 --- a/js/id/ui/lasso.js +++ b/js/id/ui/lasso.js @@ -6,7 +6,7 @@ iD.ui.Lasso = function() { function lasso(selection) { - d3.select('#id-container').classed('lasso', true); + context.container().classed('lasso', true); group = selection.append('g') .attr('class', 'lasso hide'); @@ -55,7 +55,7 @@ iD.ui.Lasso = function() { d3.select(this).remove(); })); } - d3.select('#id-container').classed('lasso', false); + context.container().classed('lasso', false); }; return lasso;