Skip to content

Commit

Permalink
Merge pull request #985 from OpenGeoscience/fix-image-fixed-scale
Browse files Browse the repository at this point in the history
Fix a small bug in canvas quads with fixed scale
  • Loading branch information
manthey authored Apr 3, 2019
2 parents c65340b + 35ea761 commit 84f6daa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Changes
- The point clustering radius value is now in display pixels (#983)

### Bug Fixes
- Fixed drawing partial fixed-scale canvas quads (#985)

## Version 0.19.2

### Improvements
Expand Down
4 changes: 2 additions & 2 deletions src/canvas/quadFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ var canvas_quadFeature = function (arg) {
if (!quad.crop) {
context2d.drawImage(src, 0, 0);
} else {
var cropx = Math.min(src.w, quad.crop.x),
cropy = Math.min(src.h, quad.crop.y);
var cropx = Math.min(w, quad.crop.x),
cropy = Math.min(h, quad.crop.y);
if (cropx > 0 && cropy > 0) {
context2d.drawImage(src, 0, 0, cropx, cropy, 0, 0, cropx, cropy);
}
Expand Down

0 comments on commit 84f6daa

Please sign in to comment.