Closed strongpauly closed 1 year ago
Workaround for the immediate issue: make sure that you have a scene activated. When I tested a migration from v10 to v11, I noticed that it had deactivated my active scene. I'm not sure if v10 had a similar issue or not, but at least this got me past this immediate error.
However, beyond that, a more significant v11-related issue: it seems that the Foundry developers have modified several of their "private" members so that they are now actually private, as opposed to "we've put an underscore prefix to indicate the intent, so pretty-please don't use them". As I understand it, there is no way for something like this module to work around this and get access to private members directly, so it would need to find some other way to do what it's trying to do... or, perhaps, temporarily disable the "Middle-mouse to pan" behavior until a better approach can be found?
Specifically, _handleMouseDown
(v10) seems to have become #handleMouseDown
(v11).
Perhaps there's a need to get in touch with the foundry devs. They recently relaxed some methods from private to protected: https://github.com/foundryvtt/foundryvtt/issues/9471. Do you think a subclass of the MouseInteractionManager
would work?
Perhaps there's a need to get in touch with the foundry devs. They recently relaxed some methods from private to protected: foundryvtt/foundryvtt#9471. Do you think a subclass of the
MouseInteractionManager
would work?
foundryvtt/foundryvtt#9562
Thanks for doing this deep dive and saving me some time!
Andrew's comment makes sense:
The correct way for a module like ZoomPanOptions to implement a middle-mouse-to-pan feature would be to register its own event listeners and handlers on the canvas stage and handle those events when appropriate, stopping propagation of the events to the underlying core mouse interaction manager.
I'll try to do exactly this, when I work on this compatibility fix. I'm currently on vacation, but you should expect a fix within 1-2 weeks (I'll go through all my modules and update them for v11).
If I find out that middle-mouse-to-pan is still broken and not easy to fix, I might have to temporarily remove the feature while researching how to correctly fix it.
Fixed in v1.10.0, but my fix is really ugly: I had to copy paste and slightly edit a lot of foundry code. I'll ask Atropos if there's a better way.
When loading the module in v11 I see this error:
Zoom/Pan Options: Error detected in module. It is likely this module has not been updated for FVTT Version 11 Stable.
Then in the console, I see this error: