add history.intersects to context

This commit is contained in:
Ansis Brammanis
2013-02-13 18:12:53 -05:00
parent 8c1e0212f9
commit 7102fea04d
4 changed files with 4 additions and 3 deletions

View File

@@ -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')));

View File

@@ -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) {

View File

@@ -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);

View File

@@ -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;