don't calculateInRange if it's not needed. r=elemoine (closes #2400)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9958 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -644,9 +644,8 @@ OpenLayers.Layer = OpenLayers.Class({
|
|||||||
* display - {Boolean}
|
* display - {Boolean}
|
||||||
*/
|
*/
|
||||||
display: function(display) {
|
display: function(display) {
|
||||||
var inRange = this.calculateInRange();
|
|
||||||
if (display != (this.div.style.display != "none")) {
|
if (display != (this.div.style.display != "none")) {
|
||||||
this.div.style.display = (display && inRange) ? "block" : "none";
|
this.div.style.display = (display && this.calculateInRange()) ? "block" : "none";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user