fix currentClip == null
This commit is contained in:
@@ -688,12 +688,18 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|||||||
let contextSaved = false;
|
let contextSaved = false;
|
||||||
// Clip mask for regions in this tile that already filled by a higher z tile
|
// Clip mask for regions in this tile that already filled by a higher z tile
|
||||||
const currentClip = executorGroups[0].getClipCoords(transform);
|
const currentClip = executorGroups[0].getClipCoords(transform);
|
||||||
|
if (currentClip) {
|
||||||
for (let j = 0, jj = clips.length; j < jj; ++j) {
|
for (let j = 0, jj = clips.length; j < jj; ++j) {
|
||||||
if (z !== currentZ && currentZ < clipZs[j]) {
|
if (z !== currentZ && currentZ < clipZs[j]) {
|
||||||
const clip = clips[j];
|
const clip = clips[j];
|
||||||
if (
|
if (
|
||||||
intersects(
|
intersects(
|
||||||
[currentClip[0], currentClip[3], currentClip[4], currentClip[7]],
|
[
|
||||||
|
currentClip[0],
|
||||||
|
currentClip[3],
|
||||||
|
currentClip[4],
|
||||||
|
currentClip[7],
|
||||||
|
],
|
||||||
[clip[0], clip[3], clip[4], clip[7]]
|
[clip[0], clip[3], clip[4], clip[7]]
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
@@ -718,6 +724,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer {
|
|||||||
}
|
}
|
||||||
clips.push(currentClip);
|
clips.push(currentClip);
|
||||||
clipZs.push(currentZ);
|
clipZs.push(currentZ);
|
||||||
|
}
|
||||||
for (let t = 0, tt = executorGroups.length; t < tt; ++t) {
|
for (let t = 0, tt = executorGroups.length; t < tt; ++t) {
|
||||||
const executorGroup = executorGroups[t];
|
const executorGroup = executorGroups[t];
|
||||||
executorGroup.execute(
|
executorGroup.execute(
|
||||||
|
|||||||
Reference in New Issue
Block a user