Adding an autoActivate property for controls. If this is set to true, the control will be activated when it is added to a map. This is true for the Navigation, NavigationHistory, KeyboardDefaults, and Panel controls. False for others. r=elemoine (closes #2200)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9589 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -67,11 +67,11 @@ OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, {
|
||||
limit: 50,
|
||||
|
||||
/**
|
||||
* Property: activateOnDraw
|
||||
* {Boolean} Activate the control when it is first added to the map.
|
||||
* Default is true.
|
||||
* APIProperty: autoActivate
|
||||
* {Boolean} Activate the control when it is added to a map. Default is
|
||||
* true.
|
||||
*/
|
||||
activateOnDraw: true,
|
||||
autoActivate: true,
|
||||
|
||||
/**
|
||||
* Property: clearOnDeactivate
|
||||
@@ -224,9 +224,6 @@ OpenLayers.Control.NavigationHistory = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
this.next.draw();
|
||||
this.previous.draw();
|
||||
if(this.activateOnDraw) {
|
||||
this.activate();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user