Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d5f18dc120 | ||
|
|
0ddae22661 | ||
|
|
fb2506672c | ||
|
|
391ff4eeab | ||
|
|
4686dfc0bb |
9
changelog/v3.2.1.md
Normal file
9
changelog/v3.2.1.md
Normal 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))
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "openlayers",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.1",
|
||||
"description": "Build tools and sources for developing OpenLayers based mapping applications",
|
||||
"keywords": [
|
||||
"map",
|
||||
|
||||
@@ -152,9 +152,8 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
||||
function(feature, layer) {
|
||||
selected.push(feature);
|
||||
}, undefined, this.layerFilter_);
|
||||
if (selected.length > 0 &&
|
||||
features.getLength() == 1 &&
|
||||
features.item(0) == selected[selected.length - 1]) {
|
||||
if (selected.length > 0 && features.getLength() == 1 &&
|
||||
features.item(0) == selected[0]) {
|
||||
// No change
|
||||
} else {
|
||||
if (features.getLength() !== 0) {
|
||||
@@ -163,7 +162,7 @@ ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
|
||||
if (this.multi_) {
|
||||
features.extend(selected);
|
||||
} else if (selected.length > 0) {
|
||||
features.push(selected[selected.length - 1]);
|
||||
features.push(selected[0]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user