Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who helped out in making this happen. (I could list people, but the list would be long, and I'm already mentally on vacation.) git-svn-id: http://svn.openlayers.org/trunk/openlayers@3545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -4,9 +4,12 @@
|
||||
|
||||
|
||||
/**
|
||||
* @class
|
||||
*
|
||||
* @requires OpenLayers/Control.js
|
||||
*
|
||||
* Class: OpenLayers.PanZoom
|
||||
*
|
||||
* Inherits from:
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
OpenLayers.Control.PanZoom = OpenLayers.Class.create();
|
||||
OpenLayers.Control.PanZoom.X = 4;
|
||||
@@ -14,17 +17,26 @@ OpenLayers.Control.PanZoom.Y = 4;
|
||||
OpenLayers.Control.PanZoom.prototype =
|
||||
OpenLayers.Class.inherit( OpenLayers.Control, {
|
||||
|
||||
/** @type int */
|
||||
/**
|
||||
* APIProperty: slideFactor
|
||||
* {Float}
|
||||
*/
|
||||
slideFactor: 50,
|
||||
|
||||
/** @type Array of Button Divs */
|
||||
/**
|
||||
* Property: buttons
|
||||
* Array of Button Divs
|
||||
*/
|
||||
buttons: null,
|
||||
|
||||
/** @type OpenLayers.Pixel */
|
||||
/**
|
||||
* Property: position
|
||||
* {<OpenLayers.Pixel>}
|
||||
*/
|
||||
position: null,
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* Constructor: OpenLayers.PanZoom
|
||||
*/
|
||||
initialize: function() {
|
||||
this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,
|
||||
@@ -33,7 +45,7 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
* APIMethod: destroy
|
||||
*/
|
||||
destroy: function() {
|
||||
OpenLayers.Control.prototype.destroy.apply(this, arguments);
|
||||
@@ -47,10 +59,13 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
* Method: draw
|
||||
*
|
||||
* Parameters:
|
||||
* px - {<OpenLayers.Pixel>}
|
||||
*
|
||||
* @returns A reference to the container div for the PanZoom control
|
||||
* @type DOMElement
|
||||
* Returns:
|
||||
* {DOMElement} A reference to the container div for the PanZoom control
|
||||
*/
|
||||
draw: function(px) {
|
||||
// initialize our internal div
|
||||
@@ -79,15 +94,17 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {String} id
|
||||
* @param {String} img
|
||||
* @param {OpenLayers.Pixel} xy
|
||||
* @param {OpenLayers.Size} sz
|
||||
* Method: _addButton
|
||||
*
|
||||
* @returns A Div (an alphaImageDiv, to be precise) that contains the
|
||||
* image of the button, and has all the proper event handlers
|
||||
* set.
|
||||
* @type DOMElement
|
||||
* Parameters:
|
||||
* id - {String}
|
||||
* img - {String}
|
||||
* xy - {<OpenLayers.Pixel>}
|
||||
* sz - {<OpenLayers.Size>}
|
||||
*
|
||||
* Returns:
|
||||
* {DOMElement} A Div (an alphaImageDiv, to be precise) that contains the
|
||||
* image of the button, and has all the proper event handlers set.
|
||||
*/
|
||||
_addButton:function(id, img, xy, sz) {
|
||||
var imgLocation = OpenLayers.Util.getImagesLocation() + img;
|
||||
@@ -116,9 +133,12 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
*
|
||||
* @type Boolean
|
||||
* Method: doubleClick
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Event}
|
||||
*
|
||||
* Returns: {Boolean}
|
||||
*/
|
||||
doubleClick: function (evt) {
|
||||
OpenLayers.Event.stop(evt);
|
||||
@@ -126,7 +146,10 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {Event} evt
|
||||
* Method: buttonDown
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Event}
|
||||
*/
|
||||
buttonDown: function (evt) {
|
||||
if (!OpenLayers.Event.isLeftClick(evt)) return;
|
||||
|
||||
Reference in New Issue
Block a user