Ticket #1013: clone.patch
| File clone.patch, 1.6 kB (added by euzuro, 1 year ago) |
|---|
-
tests/Layer/test_WMS.html
old new 352 352 map.destroy(); 353 353 354 354 } 355 356 // DEPRECATED -- REMOVE IN 3.0 357 function test_Layer_Untiled_WMS(t) { 358 t.plan(1); 359 360 var layer = new OpenLayers.Layer.WMS.Untiled(); 361 362 var clone = layer.clone(); 363 364 t.ok(clone.singleTile, "regression test: clone works. this is for #1013"); 365 } 355 366 356 367 function test_99_Layer_WMS_destroy (t) { 357 368 -
lib/OpenLayers/Layer/WMS/Untiled.js
old new 40 40 OpenLayers.Console.warn(msg); 41 41 }, 42 42 43 /** 44 * Method: clone 45 * Create a clone of this layer 46 * 47 * Returns: 48 * {<OpenLayers.Layer.Untiled.WMS>} An exact clone of this layer 49 */ 50 clone: function (obj) { 51 52 if (obj == null) { 53 obj = new OpenLayers.Layer.WMS.Untiled(this.name, 54 this.url, 55 this.params, 56 this.options); 57 } 58 59 //get all additions from superclasses 60 obj = OpenLayers.Layer.WMS.prototype.clone.apply(this, [obj]); 61 62 // copy/set any non-init, non-simple values here 63 64 return obj; 65 }, 66 43 67 CLASS_NAME: "OpenLayers.Layer.WMS.Untiled" 44 68 });
