-
Notifications
You must be signed in to change notification settings - Fork 281
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
Some handlers not working ... after fix #517 #1007
Comments
Example of other output values: map.project(corner).x = 12888737.999999993 |
Hmm, thanks for documenting this... can you share a screen recording of the issue? What projection are you using, L.CRS.Simple? Is there any way we can try out the code you're using interactively? Thanks again! |
Sorry Im not skilled on all this, not sure what kind of L.CRS im using, i copy you my lines to creqate the map:
|
this is the code I have modified to "patch" the issue (but really is a worng solution):
AS you see I simply set a Math.abs fucntion to move all values to positive and avoid the incorrect boolean check that broke the handlers. But as said, that not correct too, it is simply a logical patch. As you see in my previous message the number returned in map.project(corner).y they are totally crazy on the CRS map, not sure why.. I don't have the necessary knowledge in all of this. When at work I will try to record a video for you. |
No worries at all - that's very helpful -- would you be able to share the
entire HTML page so we can try it, maybe using gist.github.com? Thank you!
…On Fri, Aug 19, 2022 at 7:53 AM themacboy ***@***.***> wrote:
this is the code I have modified to "patch" the issue (but really is a
worng solution):
_cornerExceedsMapLats: function(zoom, corner, map) { var exceedsTop; var
exceedsBottom; if (zoom === 0) { exceedsTop = Math.abs(
map.project(corner).y ) < 2; exceedsBottom = Math.abs(
map.project(corner).y ) >= 255; } else { exceedsTop = Math.abs(
map.project(corner).y / zoom ) < 2; exceedsBottom = Math.abs(
map.project(corner).y / Math.pow(2, zoom) ) >= 255; } return (exceedsTop ||
exceedsBottom); },
—
Reply to this email directly, view it on GitHub
<#1007 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J2Y6C736J5PH24RHK3VZ5YTBANCNFSM55Q6HJOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Is it possible the projection is uniquely rejecting out of bounds coordinates and that we could bypass by actually limiting them to just under 180 or 90, so like 179.999 and 89.999? Just to avoid the situation entirely. |
Or might another solution be to just turn off this bounds limiting check for the L.CRS.simple projection until we can otherwise resolve it? |
@steveruiz @jbogdani does this last suggestion seem an ok workaround for you? |
Yes - I think entirely turning off the bounds limiting check for L.CRS.Simple is the right way to go. |
Excellent, i will craft a first-timers-only issue from it and it should get completed soon then. Thank you! |
Just copying in info here as i go: Leaflet.DistortableImage/src/DistortableImageOverlay.js Lines 213 to 240 in 00ceec2
|
This method is called twice, both times in that file: Leaflet.DistortableImage/src/DistortableImageOverlay.js Lines 232 to 234 in 00ceec2
and
|
OK, I've created an issue for it here: #1032 and asked a first-timer to try solving it. Thanks! |
Hi all, once the final steps are made in #1033 would you mind testing them out? Thank you!! |
Hello @themacboy @steveruiz @jbogdani @tadiraman can you check out the release candidate at #1036 (v0.21.9) to confirm if it does or doesn't address the issues you've been having? (remembering that we are guessing they are all inter-related but it's still possible this may fix things for some but not all of you?) Thank you! |
Hi @themacboy @steveruiz @jbogdani @tadiraman just checking if you've been able to give this a try. No rush though. Thanks! <3 |
With the exception in last update it is working as normal for me. Not sure if there can be other issues, but now is working for sure |
Excellent. I'm going to go ahead and make the release in the next day or two i hope. Will be great to hear from others, but if it fixes your issue, it's enough to move forward with a release. We can distinguish which other issues were or weren't resolved afterwards if need be. Thanks! |
Published!!! |
opsss but news! there is an error yet. Now I go to PR a solution #1141 |
Oh, can you share the error? Can you try it in incognito mode? Thank you !
…On Thu, Oct 13, 2022, 11:56 AM themacboy ***@***.***> wrote:
opsss but news! there is a error yet, sorry when I test the changes
something remain in my browser cache.
Now I go to PR a solution
—
Reply to this email directly, view it on GitHub
<#1007 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6JZVU6VKDLZUXTXBEWDWC525BANCNFSM55Q6HJOA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Got your fix in #1141 and merged it. Should be able to publish a new version again soon. Thanks! |
Good morning,
for some reason drag, rotate, freerotate and other handlers won't do his job in some circumstances.
After a lot of time debugging the code, to find the problem I have noticed that changes in #517 has broke the usual behavior of this handlers.
I have noticed that the problem is in the function:
_cornerExceedsMapLats: function(zoom, corner, map) {...}
on file DistortabeImageOverlay.jsand the problem becomes in the next check:
for some reason, in the map I use, the variable
map.project(corner).y
returns a negative value, and obviously this is always lower than 2then next both checks return
True
:exceedsTop = map.project(corner).y < 2;
or
exceedsTop = map.project(corner).y / zoom < 2;
and it make leave the normal execution of the handler function.
Im still not use why
map.project(corner).y
return a negative value, probably due the system coordinates Im using.And probably this is a bug on the logics in the code. @jywarren
The text was updated successfully, but these errors were encountered: