#826 - reworking arguments for NavToolbar and parent class

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3682 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-07-10 21:15:28 +00:00
parent 0638628a50
commit 07e2bc319b
2 changed files with 10 additions and 6 deletions

View File

@@ -16,9 +16,13 @@ OpenLayers.Control.NavToolbar.prototype =
/**
* Constructor: OpenLayers.Control.NavToolbar
* Add our two mousedefaults controls.
*
* Parameters:
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, arguments);
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.ZoomBox()

View File

@@ -30,11 +30,11 @@ OpenLayers.Control.Panel.prototype =
* Constructor: OpenLayers.Control
*
* Parameters:
* element - {DOMElement}
* base - {String}
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(element) {
OpenLayers.Control.prototype.initialize.apply(this, arguments);
initialize: function(options) {
OpenLayers.Control.prototype.initialize.apply(this, [options]);
this.controls = [];
},