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