[openlayers3] 03/08: Imported Upstream version 3.2.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sun Jan 24 20:22:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository openlayers3.

commit d491db166e9e0978817cb5003cd07ce897b96095
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Feb 26 19:36:23 2015 +0100

    Imported Upstream version 3.2.1
---
 changelog/v3.2.1.md                     | 9 +++++++++
 package.json                            | 2 +-
 src/ol/interaction/selectinteraction.js | 7 +++----
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/changelog/v3.2.1.md b/changelog/v3.2.1.md
new file mode 100644
index 0000000..afbacb7
--- /dev/null
+++ b/changelog/v3.2.1.md
@@ -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))
diff --git a/package.json b/package.json
index e52685d..d0358a8 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/src/ol/interaction/selectinteraction.js b/src/ol/interaction/selectinteraction.js
index 9a995a0..4fe27c3 100644
--- a/src/ol/interaction/selectinteraction.js
+++ b/src/ol/interaction/selectinteraction.js
@@ -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 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/openlayers3.git



More information about the Pkg-grass-devel mailing list