Skip to content

Commit b6422f7

Browse files
committed
fix: Don't generate quadFeature events if they are beyond a crop zone
1 parent 48aa8ec commit b6422f7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/quadFeature.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ var quadFeature = function (arg) {
237237
coordbasis.y = 1 - coordbasis.y;
238238
}
239239
if (coordbasis) {
240+
if (quad.crop && quad.crop.x !== undefined && quad.crop.y !== undefined && (coordbasis.x >= quad.crop.x || coordbasis.y >= quad.crop.y)) {
241+
indices.pop();
242+
found.pop();
243+
return;
244+
}
240245
extra[quad.idx] = {basis: coordbasis, _quad: quad};
241246
}
242247
}

0 commit comments

Comments
 (0)