Skip to content

Only update the rbush item if the extent has changed #3129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2015

Conversation

fredj
Copy link
Member

@fredj fredj commented Jan 14, 2015

To be able to update a feature property while iterating. Example:

source.forEachFeature(function(feature) {
  feature.set('foo', 'bar');
});

The feature was lost during the migration to CommonJS style modules in #2867.

See also #2219

@ahocevar
Copy link
Member

Are you sure that the extent change works while iterating? Previously we threw exceptions in this case.

@fredj
Copy link
Member Author

fredj commented Jan 14, 2015

If the extent is modified while iterating an exception will be thrown in remove.

The exception could be thrown in update (as before)

@fredj
Copy link
Member Author

fredj commented Jan 14, 2015

An exception is now thrown if the extent is modified while reading

@ahocevar
Copy link
Member

I think this is good now. I just restarted Travis to see if she agrees. But if she does, please merge.

@fredj
Copy link
Member Author

fredj commented Jan 14, 2015

Thanks for the review

fredj added a commit that referenced this pull request Jan 14, 2015
Only update the rbush item if the extent has changed
@fredj fredj merged commit dafcdfa into openlayers:master Jan 14, 2015
@fredj fredj deleted the rbush-update branch January 14, 2015 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants