Ticket #787: removeClearArray.patch
| File removeClearArray.patch, 1.6 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 61 61 return array; 62 62 }; 63 63 64 /**65 */66 OpenLayers.Util.clearArray = function(array) {67 array.length = 0;68 };69 70 64 /** Seems to exist already in FF, but not in MOZ. 71 65 * 72 66 * @param {Array} array -
lib/OpenLayers/Layer/WFS.js
old new 334 334 if (this.tile) { 335 335 if (this.vectorMode) { 336 336 this.renderer.clear(); 337 OpenLayers.Util.clearArray(this.features);337 this.features.length = 0; 338 338 } else { 339 339 this.clearMarkers(); 340 OpenLayers.Util.clearArray(this.markers);340 this.markers.length = 0; 341 341 } 342 342 this.tile.draw(); 343 343 }
