replace Size argument with simple object (maker.draw)

This commit is contained in:
fredj
2012-01-09 14:26:23 +01:00
committed by Frederic Junod
parent 8825b32924
commit c440a2916d

View File

@@ -49,10 +49,10 @@ OpenLayers.Layer.Boxes = OpenLayers.Class(OpenLayers.Layer.Markers, {
if (botright == null || topleft == null) {
marker.display(false);
} else {
var sz = new OpenLayers.Size(
Math.max(1, botright.x - topleft.x),
Math.max(1, botright.y - topleft.y));
var markerDiv = marker.draw(topleft, sz);
var markerDiv = marker.draw(topleft, {
w: Math.max(1, botright.x - topleft.x),
h: Math.max(1, botright.y - topleft.y)
});
if (!marker.drawn) {
this.div.appendChild(markerDiv);
marker.drawn = true;