Ticket #795: redraw.patch
| File redraw.patch, 1.7 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 343 // min/max Range may have changed 344 this.inRange = this.calculateInRange(); 345 346 var bounds = this.getExtent(); 347 this.moveTo(bounds, true, false); 348 }, 349 350 /** 338 351 * Method: moveTo 339 352 * 340 353 * Parameters: … … 450 463 setVisibility: function(visibility, noEvent) { 451 464 if (visibility != this.visibility) { 452 465 this.visibility = visibility; 453 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 } 466 this.redraw(); 460 467 if ((this.map != null) && 461 468 ((noEvent == null) || (noEvent == false))) { 462 469 this.map.events.triggerEvent("changelayer"); -
lib/OpenLayers/Map.js
old new 515 515 layer.setVisibility(false); 516 516 } 517 517 } else { 518 if (this.getCenter() != null) { 519 layer.moveTo(this.getExtent(), true); 520 } 518 layer.redraw(); 521 519 } 522 520 523 521 this.events.triggerEvent("addlayer");
