-
-
Notifications
You must be signed in to change notification settings - Fork 595
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 coordinates conversion with rotation. #796
Conversation
cy = this.canvas.height / 2; | ||
_offsetForRotation: function(degrees, useSketch) { | ||
var cx = this.canvas.width / 2; | ||
var cy = this.canvas.height / 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a fan of this change. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
About that method, is it ok to call it from tiledImage: https://github.com/openseadragon/openseadragon/pull/796/files#diff-80bee396a520b6fa750064722bc3f0ceR1335 even though it is "private"?
Or the underscore rather means "internal"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've been wresting with that myself. I think I'm feeling the underscore in the context of this library means internal to the library rather than private to this object. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works for me. At least for methods.
For properties, that can make it hard to debug if they can be modified from anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
This is a big patch! Seems decent in theory...let me know when you've sorted those bugs out. I think you should be able to test the placeholder by doing an ImageTileSource with a broken URL...that way the placeholder should stay up the whole time. |
So I tested the place holder and it works fine. The only remaining issue is the edge smoothing. I spent quite some time on it without coming up with a fix. I will look again but ideas are welcome :) |
By edge smoothing are you referring to #764? Perhaps @MindFreeze might have some ideas. Meanwhile, I'm still thinking about function names. |
Yes. There is a translation error when there is rotation and I am not sure of the best way to fix that.
You are right, scale seems the best term for the delta functions but is not accurate for |
Another option would be to go with a flag, so you'd have Sounds like the edge smoothing translation error with rotation was already part of @MindFreeze's original patch? Or has this patch made it worse? Either way, hopefully he can weigh in here. |
I started by adding a flag but I later felt that the code would be cleaner with separate methods.
I believe it was already present. |
The problem with edge smoothing seems to be related to the scaling. I am looking into it. No luck yet. |
I finally found the trick. See avandecreme@eaed2d5 |
@iangilman Any thought on that?
I think the solution I prefer is the |
Sure, I'm fine with the |
Done :) |
Lovely! Does this close any tickets? |
Fix coordinates conversion with rotation.
Actually not. But we should add that to the changelog though. Let me know if you want me to do it. |
I've added this PR to the changelog: 3c44666 |
Excellent 👍 |
That ended up quite big.
This first commit should fix:
Bugs to fix: