You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was using Proj4Leaflet to create custom CRS's and accidentally discovered that the Draggable's onZoomEnd handler doesn't account for the fact that map.getPixelWorldBounds() can return null when the crs.getProjectedBounds() returns null. That happens if it has the infinite flag returning true. This cascades to a null reference error during loading when this._map.getPixelWorldBounds().getSize().x blows up.
Note that you have to set worldCopyJump to true in order to actually have the onZoomEnd handler get wired up! In the fiddle, if you turn it off you don't get the error.
I'll let someone who knows more about how Draggable works think about how to handle the infinite case....
Steps to reproduce
Steps to reproduce the behavior:
Create a CRS object that sets infinite to true.
Apply it to the map options on initialization and set worldCopyJump to true so that the onZoomEnd handler is attached.
OS/Platform (with version): Windows 10 | Amazon Linux 2
Minimal example reproducing the issue
I've created a contrived case to demonstrate the issue here. It's not how I stumbled on it originally, but it demonstrates the error. https://jsfiddle.net/fv0k9o1w/
The text was updated successfully, but these errors were encountered:
I was using Proj4Leaflet to create custom CRS's and accidentally discovered that the Draggable's onZoomEnd handler doesn't account for the fact that map.getPixelWorldBounds() can return null when the crs.getProjectedBounds() returns null. That happens if it has the infinite flag returning true. This cascades to a null reference error during loading when
this._map.getPixelWorldBounds().getSize().x
blows up.Note that you have to set worldCopyJump to true in order to actually have the onZoomEnd handler get wired up! In the fiddle, if you turn it off you don't get the error.
I'll let someone who knows more about how Draggable works think about how to handle the infinite case....
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
No errors.
Current behavior
Null reference error.
Environment
Minimal example reproducing the issue
I've created a contrived case to demonstrate the issue here. It's not how I stumbled on it originally, but it demonstrates the error.
https://jsfiddle.net/fv0k9o1w/
The text was updated successfully, but these errors were encountered: