enable programmatically calling the clickFeature metod of the select feature control, r=crschmidt (closes #1449)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2009-03-03 12:45:24 +00:00
parent 1b370297d4
commit 95206bdeae

View File

@@ -260,7 +260,8 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
* {Boolean} Allow for multiple selected features. * {Boolean} Allow for multiple selected features.
*/ */
multipleSelect: function() { multipleSelect: function() {
return this.multiple || this.handlers.feature.evt[this.multipleKey]; return this.multiple || (this.handlers.feature.evt &&
this.handlers.feature.evt[this.multipleKey]);
}, },
/** /**
@@ -272,7 +273,8 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
* {Boolean} Toggle the selected state of a feature. * {Boolean} Toggle the selected state of a feature.
*/ */
toggleSelect: function() { toggleSelect: function() {
return this.toggle || this.handlers.feature.evt[this.toggleKey]; return this.toggle || (this.handlers.feature.evt &&
this.handlers.feature.evt[this.toggleKey]);
}, },
/** /**