Added a position property to Control, which allows us to specify a default
location for each Control class, and saves us from *having* to supply a pixel position to the map.addControl() method -- the sensible default will tend to be used instead. git-svn-id: http://svn.openlayers.org/trunk/openlayers@269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,7 +4,10 @@
|
||||
OpenLayers.Control.PanZoom = Class.create();
|
||||
OpenLayers.Control.PanZoom.prototype =
|
||||
Object.extend( new OpenLayers.Control(), {
|
||||
// Array(...)
|
||||
/** @type OpenLayers.Pixel */
|
||||
position: new OpenLayers.Pixel(4,4),
|
||||
|
||||
/** @type Array(...) */
|
||||
buttons: null,
|
||||
|
||||
initialize: function() {
|
||||
@@ -16,7 +19,8 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
*/
|
||||
draw: function(px) {
|
||||
// initialize our internal div
|
||||
OpenLayers.Control.prototype.draw.apply(this);
|
||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||
px = this.position;
|
||||
|
||||
// place the controls
|
||||
this.buttons = new Array();
|
||||
|
||||
Reference in New Issue
Block a user