Skip to content

Commit

Permalink
Improve comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Jul 16, 2021
1 parent 09f66a0 commit 1bdc0d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tileLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ var tileLayer = function (arg) {
Object.defineProperty(this, 'queue', {
get: function () { return m_this._queue; },
set: function (queue) {
/* The queue's needed function determines if a tile is still needed. A
* tile in the queue is needed if it is needed by at least one layer that
* is using it. _tileLayers tracks the layers that share the queue to
* allow walking through the layers and check if any layer needs a tile.
* When the queue is set, maintain the list of joined tile layers. */
if (m_this._queue !== queue) {
if (this._queue && this._queue._tileLayers && this._queue._tileLayers.indexOf(m_this) >= 0) {
this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(m_this), 1);
Expand Down

0 comments on commit 1bdc0d9

Please sign in to comment.