Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a small bug in canvas quads with fixed scale #985

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Mar 11, 2019

This can be seen, for instance, in the deep zoom example where the lower partial tiles were not being rendered.

@@ -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),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference between src.w and w? do they point to different values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w is a local variable that was taken from src.width or src.videoWidth. src.w was incorrect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thans.

This can be seen, for instance, in the deep zoom example where the lower
partial tiles were not being rendered.
@@ -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),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thans.

@manthey manthey merged commit 84f6daa into master Apr 3, 2019
@manthey manthey deleted the fix-image-fixed-scale branch April 3, 2019 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants