Revert "loleaflet: Change !(... >= 0) to ... < 0 for readability."

This reverts commit 00d7ab3519.
_currentPage can also be undefined so in that case
!(this._currentPage >= 0) will be evaluated to true
while
this._currentPage < 0 will be false (as it should be)
This commit is contained in:
Mihai Varga 2015-12-11 14:50:07 +02:00
parent 35a505d35e
commit 152ad884e2

View file

@ -949,7 +949,7 @@ L.TileLayer = L.GridLayer.extend({
_onCurrentPageUpdate: function () {
var mapCenter = this._map.project(this._map.getCenter());
if (!this._partPageRectanglesPixels || this._currentPage < 0 || this._currentPage >= this._partPageRectanglesPixels.length ||
if (!this._partPageRectanglesPixels || !(this._currentPage >= 0) || this._currentPage >= this._partPageRectanglesPixels.length ||
this._partPageRectanglesPixels[this._currentPage].contains(mapCenter)) {
// page number has not changed
return;