replace Size argument with simple object (maker.draw)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user