Skip to content

Commit

Permalink
Merge pull request #1258 from OpenGeoscience/better-cropping
Browse files Browse the repository at this point in the history
fix: Improve quad cropping to zero
  • Loading branch information
manthey authored Nov 29, 2022
2 parents 2f260ac + 3bad67a commit 1783d0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webgl/quadFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ var webgl_quadFeature = function (arg) {
if (!crop || quadcrop.x !== crop.x || quadcrop.y !== crop.y) {
crop = quadcrop;
context.uniform2fv(renderState.m_material.shaderProgram()
.uniformLocation('crop'), new Float32Array([crop.x || 1, crop.y || 1]));
.uniformLocation('crop'), new Float32Array([crop.x === undefined ? 1 : crop.x, crop.y === undefined ? 1 : crop.y]));
}
w = quad.image.width;
h = quad.image.height;
Expand Down

0 comments on commit 1783d0b

Please sign in to comment.