Ticket #795: redraw.3.patch
| File redraw.3.patch, 3.9 kB (added by euzuro, 1 year ago) |
|---|
-
lib/OpenLayers/Layer.js
old new 335 335 }, 336 336 337 337 /** 338 * APIMethod: redraw 339 * Redraws the layer 340 */ 341 redraw: function() { 342 if (this.map) { 343 344 // min/max Range may have changed 345 this.inRange = this.calculateInRange(); 346 347 // map's center might not yet be set 348 var extent = this.getExtent(); 349 350 if (extent && this.inRange && this.visibility) { 351 this.moveTo(extent, true, false); 352 } 353 } 354 }, 355 356 /** 338 357 * Method: moveTo 339 358 * 340 359 * Parameters: … … 451 470 if (visibility != this.visibility) { 452 471 this.visibility = visibility; 453 472 this.display(visibility); 454 if (visibility && this.map != null) { 455 var extent = this.map.getExtent(); 456 if (extent != null) { 457 this.moveTo(extent, true); 458 } 459 } 473 this.redraw(); 460 474 if ((this.map != null) && 461 475 ((noEvent == null) || (noEvent == false))) { 462 476 this.map.events.triggerEvent("changelayer"); -
lib/OpenLayers/Map.js
old new 518 518 layer.setVisibility(false); 519 519 } 520 520 } else { 521 if (this.getCenter() != null) { 522 layer.moveTo(this.getExtent(), true); 523 } 521 layer.redraw(); 524 522 } 525 523 526 524 this.events.triggerEvent("addlayer"); -
lib/OpenLayers/Layer/Markers.js
old new 72 72 OpenLayers.Layer.prototype.moveTo.apply(this, arguments); 73 73 74 74 if (zoomChanged || !this.drawn) { 75 this.redraw(); 75 for(i=0; i < this.markers.length; i++) { 76 this.drawMarker(this.markers[i]); 77 } 76 78 this.drawn = true; 77 79 } 78 80 }, … … 116 118 } 117 119 }, 118 120 119 /**120 * APIMethod: redraw121 * Clear all the marker div's from the layer and then redraw all of them.122 * Use the map to recalculate new placement of markers.123 */124 redraw: function() {125 for(i=0; i < this.markers.length; i++) {126 this.drawMarker(this.markers[i]);127 }128 },129 130 121 /** 131 122 * Method: drawMarker 132 123 * Calculate the pixel location for the marker, create it, and -
lib/OpenLayers/Layer/MapServer/Untiled.js
old new 254 254 mergeNewParams:function(newParams) { 255 255 OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this, 256 256 [newParams]); 257 //redraw 258 this.moveTo(null, true); 257 this.redraw(); 259 258 }, 260 259 261 260 /** -
lib/OpenLayers/Layer/WMS/Untiled.js
old new 272 272 var newArguments = [upperParams]; 273 273 OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this, 274 274 newArguments); 275 //redraw 276 this.moveTo(null, true); 275 this.redraw(); 277 276 }, 278 277 279 278 /**
