Ticket #787: removeClearArray.3.patch
| File removeClearArray.3.patch, 1.9 kB (added by euzuro, 1 year ago) |
|---|
-
tests/test_Util.html
old new 30 30 } 31 31 32 32 function test_03_Util_Array(t) { 33 t.plan( 2);33 t.plan( 1 ); 34 34 35 35 var array = new Array(1,2,3,4,5); 36 36 37 37 OpenLayers.Util.removeItem(array, 3); 38 38 t.eq( array.toString(), "1,2,4,5", "Util.removeItem works"); 39 40 OpenLayers.Util.clearArray(array);41 t.eq( array.toString(), "", "Util.clearArray works");42 43 39 } 44 40 45 41 function test_04_Util_createDiv(t) { -
lib/OpenLayers/Util.js
old new 71 71 72 72 /** 73 73 * Function: clearArray 74 */ 74 * *Deprecated*. This function will disappear in 3.0. 75 * Please use "array.length = 0" instead. 76 * 77 * Parameters: 78 * array - {Array} 79 */ 75 80 OpenLayers.Util.clearArray = function(array) { 81 var msg = "OpenLayers.Util.clearArray() is Deprecated." + 82 " Please use 'array.length = 0' instead."; 83 OpenLayers.Console.warn(msg); 76 84 array.length = 0; 77 85 }; 78 86 -
lib/OpenLayers/Layer/WFS.js
old new 385 385 if (this.tile) { 386 386 if (this.vectorMode) { 387 387 this.renderer.clear(); 388 OpenLayers.Util.clearArray(this.features);388 this.features.length = 0; 389 389 } else { 390 390 this.clearMarkers(); 391 OpenLayers.Util.clearArray(this.markers);391 this.markers.length = 0; 392 392 } 393 393 this.tile.draw(); 394 394 }
