#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:
@@ -16,9 +16,13 @@ OpenLayers.Control.NavToolbar.prototype =
|
|||||||
/**
|
/**
|
||||||
* Constructor: OpenLayers.Control.NavToolbar
|
* Constructor: OpenLayers.Control.NavToolbar
|
||||||
* Add our two mousedefaults controls.
|
* Add our two mousedefaults controls.
|
||||||
|
*
|
||||||
|
* Parameters:
|
||||||
|
* options - {Object} An optional object whose properties will be used
|
||||||
|
* to extend the control.
|
||||||
*/
|
*/
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
OpenLayers.Control.Panel.prototype.initialize.apply(this, arguments);
|
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
|
||||||
this.addControls([
|
this.addControls([
|
||||||
new OpenLayers.Control.Navigation(),
|
new OpenLayers.Control.Navigation(),
|
||||||
new OpenLayers.Control.ZoomBox()
|
new OpenLayers.Control.ZoomBox()
|
||||||
@@ -36,4 +40,4 @@ OpenLayers.Control.NavToolbar.prototype =
|
|||||||
},
|
},
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Control.NavToolbar"
|
CLASS_NAME: "OpenLayers.Control.NavToolbar"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ OpenLayers.Control.Panel.prototype =
|
|||||||
* Constructor: OpenLayers.Control
|
* Constructor: OpenLayers.Control
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* element - {DOMElement}
|
* options - {Object} An optional object whose properties will be used
|
||||||
* base - {String}
|
* to extend the control.
|
||||||
*/
|
*/
|
||||||
initialize: function(element) {
|
initialize: function(options) {
|
||||||
OpenLayers.Control.prototype.initialize.apply(this, arguments);
|
OpenLayers.Control.prototype.initialize.apply(this, [options]);
|
||||||
this.controls = [];
|
this.controls = [];
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user