Array.indexOf(), though implemented in FF, is not standard javascript. we replace it with OpenLayers.Util.indexOf(), replace all usage
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1596 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -125,7 +125,8 @@
|
||||
map.setCenter(new OpenLayers.LonLat(0, 0), 0);
|
||||
|
||||
map.addPopup(popup);
|
||||
t.eq(map.popups.indexOf(popup), 0, "popup successfully added to Map's internal popups array");
|
||||
var pIndex = OpenLayers.Util.indexOf(map.popups, popup);
|
||||
t.eq(pIndex, 0, "popup successfully added to Map's internal popups array");
|
||||
|
||||
var nodes = map.layerContainerDiv.childNodes;
|
||||
|
||||
@@ -140,7 +141,8 @@
|
||||
|
||||
|
||||
map.removePopup(popup);
|
||||
t.eq(map.popups.indexOf(popup), -1, "popup successfully removed from Map's internal popups array");
|
||||
var pIndex = OpenLayers.Util.indexOf(map.popups, popup);
|
||||
t.eq(pIndex, -1, "popup successfully removed from Map's internal popups array");
|
||||
|
||||
var found = false;
|
||||
for (var i=0; i < nodes.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user