Fix OpenLayers.Icon apidoc

'size' can be either an OpenLayers.Size or a simple javascript object,
'offset' can be either an OpenLayers.Pixel or a simple javascript
object.
This commit is contained in:
Frederic Junod
2012-01-15 18:03:13 +01:00
parent 0af2acddb5
commit 8f4fcc7f33

View File

@@ -29,13 +29,16 @@ OpenLayers.Icon = OpenLayers.Class({
/**
* Property: size
* {<OpenLayers.Size>}
* {<OpenLayers.Size>|Object} An OpenLayers.Size or
* an object with a 'w' and 'h' properties.
*/
size: null,
/**
* Property: offset
* {<OpenLayers.Pixel>} distance in pixels to offset the image when being rendered
* {<OpenLayers.Pixel>|Object} distance in pixels to offset the
* image when being rendered. An OpenLayers.Pixel or an object
* with a 'x' and 'y' properties.
*/
offset: null,
@@ -62,8 +65,12 @@ OpenLayers.Icon = OpenLayers.Class({
* Creates an icon, which is an image tag in a div.
*
* url - {String}
* size - {<OpenLayers.Size>}
* offset - {<OpenLayers.Pixel>}
* size - {<OpenLayers.Size>|Object} An OpenLayers.Size or an
* object with a 'w' and 'h'
* properties.
* offset - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an
* object with a 'x' and 'y'
* properties.
* calculateOffset - {Function}
*/
initialize: function(url, size, offset, calculateOffset) {