update nd for OpenLayers.Control.PanZoom. (See #983)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@4386 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-09-19 01:56:00 +00:00
parent 80491d626a
commit 6ce8949189

View File

@@ -15,13 +15,13 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
/** /**
* APIProperty: slideFactor * APIProperty: slideFactor
* {Float} * {Integer}
*/ */
slideFactor: 50, slideFactor: 50,
/** /**
* Property: buttons * Property: buttons
* Array of Button Divs * {Array(DOMElement)} Array of Button Divs
*/ */
buttons: null, buttons: null,
@@ -32,9 +32,12 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
position: null, position: null,
/** /**
* Constructor: OpenLayers.PanZoom * Constructor: OpenLayers.Control.PanZoom
*
* Parameters:
* options - {Object}
*/ */
initialize: function() { initialize: function(options) {
this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X, this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,
OpenLayers.Control.PanZoom.Y); OpenLayers.Control.PanZoom.Y);
OpenLayers.Control.prototype.initialize.apply(this, arguments); OpenLayers.Control.prototype.initialize.apply(this, arguments);
@@ -61,7 +64,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
* px - {<OpenLayers.Pixel>} * px - {<OpenLayers.Pixel>}
* *
* Returns: * Returns:
* {DOMElement} A reference to the container div for the PanZoom control * {DOMElement} A reference to the container div for the PanZoom control.
*/ */
draw: function(px) { draw: function(px) {
// initialize our internal div // initialize our internal div
@@ -100,7 +103,7 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
* *
* Returns: * Returns:
* {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the * {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the
* image of the button, and has all the proper event handlers set. * image of the button, and has all the proper event handlers set.
*/ */
_addButton:function(id, img, xy, sz) { _addButton:function(id, img, xy, sz) {
var imgLocation = OpenLayers.Util.getImagesLocation() + img; var imgLocation = OpenLayers.Util.getImagesLocation() + img;
@@ -179,5 +182,14 @@ OpenLayers.Control.PanZoom = OpenLayers.Class(OpenLayers.Control, {
CLASS_NAME: "OpenLayers.Control.PanZoom" CLASS_NAME: "OpenLayers.Control.PanZoom"
}); });
/**
* Constant: X
* {Integer}
*/
OpenLayers.Control.PanZoom.X = 4; OpenLayers.Control.PanZoom.X = 4;
/**
* Constant: Y
* {Integer}
*/
OpenLayers.Control.PanZoom.Y = 4; OpenLayers.Control.PanZoom.Y = 4;