Fix broken test of new Bounds.intersectBounds, add test to ensure it doesn't
break again in the future. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1530 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -490,9 +490,18 @@ OpenLayers.Bounds.prototype = {
|
||||
if (inclusive == null) {
|
||||
inclusive = true;
|
||||
}
|
||||
var inBottom = (bounds.bottom == this.bottom && bounds.top == this.top) ?
|
||||
true : (bounds.bottom > this.bottom) && (bounds.bottom < this.top);
|
||||
var inTop = (bounds.bottom == this.bottom && bounds.top == this.top) ?
|
||||
true : (bounds.top > this.bottom) && (bounds.top < this.top);
|
||||
var inRight = (bounds.right == this.right && bounds.left == this.left) ?
|
||||
true : (bounds.right > this.left) && (bounds.right < this.right);
|
||||
var inLeft = (bounds.right == this.right && bounds.left == this.left) ?
|
||||
true : (bounds.left > this.left) && (bounds.left < this.right);
|
||||
|
||||
return (this.containsBounds(bounds, true, inclusive) ||
|
||||
bounds.containsBounds(this, true, inclusive));
|
||||
bounds.containsBounds(this, true, inclusive) ||
|
||||
(inTop || inBottom ) && (inLeft || inRight ));
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -535,7 +544,7 @@ OpenLayers.Bounds.prototype = {
|
||||
inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top);
|
||||
}
|
||||
|
||||
return (partial) ? (inTop || inBottom) && (inLeft || inRight )
|
||||
return (partial) ? (inTop || inBottom ) && (inLeft || inRight )
|
||||
: (inTop && inLeft && inBottom && inRight);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user