need to make sure a size has been declared before trying to set the offset. thank you automated testing for finding this one.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@130 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -27,7 +27,7 @@ OpenLayers.Icon.prototype = {
|
||||
this.url = url;
|
||||
|
||||
this.offset = offset;
|
||||
if (offset == null) {
|
||||
if ((size != null) && (offset == null)) {
|
||||
// default offset
|
||||
this.offset = new OpenLayers.Pixel(-(size.w / 2), -size.h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user