Compare commits

...

5 Commits

Author SHA1 Message Date
Tim Schaub
d5f18dc120 Merge pull request #3239 from openlayers/release-v3.2.1
Release v3.2.1.
2015-02-13 11:12:45 -07:00
Tim Schaub
0ddae22661 Update package version to 3.2.1 2015-02-13 10:52:02 -07:00
Tim Schaub
fb2506672c Changelog for v3.2.1 2015-02-13 10:51:31 -07:00
Tim Schaub
391ff4eeab Merge pull request #3236 from tschaub/select-fix
Select the uppermost feature.
2015-02-13 09:29:20 -07:00
Frederic Junod
4686dfc0bb Select the uppermost feature 2015-02-13 09:12:26 -07:00
3 changed files with 13 additions and 5 deletions

9
changelog/v3.2.1.md Normal file
View File

@@ -0,0 +1,9 @@
# 3.2.1
## Summary
This is a patch release that fixes a regression with the select interaction in the [3.2.0 release](https://github.com/openlayers/ol3/releases/tag/v3.2.0).
## Changes
* [#3236](https://github.com/openlayers/ol3/pull/3236) - Select the uppermost feature. ([@tschaub](https://github.com/tschaub))

View File

@@ -1,6 +1,6 @@
{ {
"name": "openlayers", "name": "openlayers",
"version": "3.2.0", "version": "3.2.1",
"description": "Build tools and sources for developing OpenLayers based mapping applications", "description": "Build tools and sources for developing OpenLayers based mapping applications",
"keywords": [ "keywords": [
"map", "map",

View File

@@ -152,9 +152,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
function(feature, layer) { function(feature, layer) {
selected.push(feature); selected.push(feature);
}, undefined, this.layerFilter_); }, undefined, this.layerFilter_);
if (selected.length > 0 && if (selected.length > 0 && features.getLength() == 1 &&
features.getLength() == 1 && features.item(0) == selected[0]) {
features.item(0) == selected[selected.length - 1]) {
// No change // No change
} else { } else {
if (features.getLength() !== 0) { if (features.getLength() !== 0) {
@@ -163,7 +162,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
if (this.multi_) { if (this.multi_) {
features.extend(selected); features.extend(selected);
} else if (selected.length > 0) { } else if (selected.length > 0) {
features.push(selected[selected.length - 1]); features.push(selected[0]);
} }
} }
} else { } else {