Skip to content

Commit e9f4806

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

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@egjs/hammerjs": "^2.0.8",
3131
"d3": "^7.8.5",
3232
"glslang-validator-prebuilt-predownloaded": "^0.0.2",
33-
"vtk.js": "*"
33+
"vtk.js": "<32.10.0 || >32.10.0"
3434
},
3535
"devDependencies": {
3636
"@babel/core": "^7.17.0",

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)