update Control, Marker, and Popup such that they all have draw(px) and move(px) functions. standardization. update tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -42,17 +42,27 @@ OpenLayers.Marker.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} pixel
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*
|
||||
* @return A new DOM Image with this marker´s icon set at the
|
||||
* location passed-in
|
||||
* @type DOMElement
|
||||
*/
|
||||
draw: function(pixel) {
|
||||
this.image.style.top = (pixel.y + this.icon.offset.y) + "px"
|
||||
this.image.style.left = (pixel.x + this.icon.offset.x) + "px";
|
||||
draw: function(px) {
|
||||
this.image.style.top = (px.y + this.icon.offset.y) + "px"
|
||||
this.image.style.left = (px.x + this.icon.offset.x) + "px";
|
||||
return this.image;
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {OpenLayers.Pixel} px
|
||||
*/
|
||||
moveTo: function (px) {
|
||||
if ((px != null) && (this.div != null)) {
|
||||
this.image.style.top = (px.y + this.icon.offset.y) + "px"
|
||||
this.image.style.left = (px.x + this.icon.offset.x) + "px";
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Marker"
|
||||
|
||||
Reference in New Issue
Block a user