remove useless or duplicate functions from Util.js -- no more: Array prepend() append() -- use push() and unshift(). clear() and indexOf() both removed as they are duplicated in Prototype.js -- all instances replaced and tests updated.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-09 03:31:06 +00:00
parent f2a3cf9348
commit 51ac2b4acf
10 changed files with 22 additions and 62 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ OpenLayers.Layer.GeoRSS.prototype =
//data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>';
}
var feature = new OpenLayers.Feature(this, location, data);
this.features.append(feature);
this.features.push(feature);
var marker = feature.createMarker();
marker.events.register('click', feature, this.markerClick);
this.addMarker(marker);
+7 -7
View File
@@ -230,7 +230,7 @@ OpenLayers.Layer.Grid.prototype =
do {
var row = new Array();
this.grid.append(row);
this.grid.push(row);
tileoffsetlon = startLon;
tileoffsetx = startX;
@@ -251,7 +251,7 @@ OpenLayers.Layer.Grid.prototype =
var tile = this.addTile(tileBounds, px);
tile.draw(this.alpha);
row.append(tile);
row.push(tile);
tileoffsetlon += tilelon;
tileoffsetx += this.tileSize.w;
@@ -395,14 +395,14 @@ OpenLayers.Layer.Grid.prototype =
position.y = position.y + deltaY;
var newTile = this.addTile(bounds, position);
newTile.draw(this.alpha);
newRow.append(newTile);
newRow.push(newTile);
}
if (newRow.length>0){
if (prepend) {
this.grid.prepend(newRow);
this.grid.unshift(newRow);
} else {
this.grid.append(newRow);
this.grid.push(newRow);
}
}
},
@@ -433,9 +433,9 @@ OpenLayers.Layer.Grid.prototype =
newTile.draw(this.alpha);
if (prepend) {
row = row.prepend(newTile);
row = row.unshift(newTile);
} else {
row = row.append(newTile);
row = row.push(newTile);
}
}
},
+2 -2
View File
@@ -99,7 +99,7 @@ OpenLayers.Layer.KaMap.prototype =
do {
var row = new Array();
this.grid.append(row);
this.grid.push(row);
tileoffsetlon = startLon;
tileoffsetx = startX;
do {
@@ -113,7 +113,7 @@ OpenLayers.Layer.KaMap.prototype =
tileoffsety - parseInt(this.map.layerContainerDiv.style.top))
);
tile.draw((this.alpha));
row.append(tile);
row.push(tile);
tileoffsetlon += tilelon;
tileoffsetx += this.tileSize.w;
+1 -1
View File
@@ -63,7 +63,7 @@ OpenLayers.Layer.Markers.prototype =
* @param {OpenLayers.Marker} marker
*/
addMarker: function(marker) {
this.markers.append(marker);
this.markers.push(marker);
if (this.map && this.map.getExtent()) {
marker.map = this.map;
this.drawMarker(marker);
+1 -1
View File
@@ -127,7 +127,7 @@ OpenLayers.Layer.Text.prototype =
data['popupContentHTML'] = '<h2>'+title+'</h2><p>'+description+'</p>';
}
var feature = new OpenLayers.Feature(this, location, data);
this.features.append(feature);
this.features.push(feature);
var marker = feature.createMarker();
marker.events.register('click', feature, this.markerClick);
this.addMarker(marker);