mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-26 07:23:40 +00:00
add history.intersects to context
This commit is contained in:
@@ -49,7 +49,7 @@ iD.behavior.Lasso = function(context) {
|
||||
.on('mouseup.lasso', null);
|
||||
|
||||
if (d3.event.clientX !== pos[0] || d3.event.clientY !== pos[1]) {
|
||||
var selected = context.history().intersects(extent);
|
||||
var selected = context.intersects(extent);
|
||||
|
||||
if (selected.length) {
|
||||
context.enter(iD.modes.Select(context, _.pluck(selected, 'id')));
|
||||
|
||||
@@ -36,6 +36,7 @@ window.iD = function () {
|
||||
context.undo = history.undo;
|
||||
context.redo = history.redo;
|
||||
context.changes = history.changes;
|
||||
context.intersects = history.intersects;
|
||||
|
||||
/* Graph */
|
||||
context.entity = function(id) {
|
||||
|
||||
@@ -65,7 +65,7 @@ iD.Map = function(context) {
|
||||
graph = context.graph();
|
||||
|
||||
if (!difference) {
|
||||
all = context.history().intersects(extent);
|
||||
all = context.intersects(extent);
|
||||
filter = d3.functor(true);
|
||||
} else {
|
||||
var complete = difference.complete(extent);
|
||||
|
||||
@@ -2,7 +2,7 @@ iD.ui.Contributors = function(context) {
|
||||
function update(selection) {
|
||||
var users = {},
|
||||
limit = 3,
|
||||
entities = context.history().intersects(context.map().extent());
|
||||
entities = context.intersects(context.map().extent());
|
||||
|
||||
for (var i in entities) {
|
||||
if (entities[i].user) users[entities[i].user] = true;
|
||||
|
||||
Reference in New Issue
Block a user