the default controls of the editing and navigation toolbars are not activated, p=jorix, r=me (closes #3268)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-05-10 07:09:17 +00:00
parent fef7e4febf
commit e1be8e9dfb
6 changed files with 49 additions and 3 deletions

View File

@@ -55,7 +55,9 @@ OpenLayers.Control.EditingToolbar = OpenLayers.Class(
*/
draw: function() {
var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
this.activateControl(this.controls[0]);
if (this.defaultControl === null) {
this.defaultControl = this.controls[0];
}
return div;
},

View File

@@ -47,7 +47,9 @@ OpenLayers.Control.NavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
*/
draw: function() {
var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
this.activateControl(this.controls[0]);
if (this.defaultControl === null) {
this.defaultControl = this.controls[0];
}
return div;
},