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:
parent
35a505d35e
commit
152ad884e2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue