Need Help Implementing a Custom Drag-Swap Interaction Between MPR Views (ActionW.DRAG_SWAP) #758
Unanswered
shivaramakrishna009
asked this question in
Q&A
Replies: 1 comment
-
|
See #757 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi @nroduit, I am building a custom drag-swap interaction in the Weasis MPR viewer, where dragging one MPR view and dropping it onto another should swap their displayed series and image content. The feature should work the same way other mouse tools (zoom, rotate, pan, measure) do — fully integrated with the existing mouse action architecture.
I have built:
ActionW.DRAG_SWAPDragSwapListenerextendingMouseActionAdapterMprViewTransferHandlerto implement drag-and-dropMprViewandImageViewerEventManagerMprControllerHowever, despite all wiring being done, the swapping does not occur, and only a “mouseReleased” debug log appears. No drag event or drop event is firing as expected, and the TransferHandler's
importData()is never reached.I am requesting help / guidance from Weasis maintainers on where the integration might be going wrong, or if MPR views block drag-and-drop events internally.
Expected Behavior
When drag-swap tool is active:
exportAsDragimportData()should triggerrequestSwap(A, B)MouseActionAdapterandActionStatesystemActual Behavior
importData()is never called.DragSwapListeneronly logsmouseReleased.What I Already Implemented
1.
DragSwapListener(MouseActionAdapter + ActionState)2. Installed TransferHandler in
MprView3. Registered in
ImageViewerEventManager4. Toolbar toggle enables/disables the action.
5.
MprController.requestSwap()performs series and image swap.Repository Impact
The issue may relate to:
PannerListener/CrosshairListenerintercepting BUTTON1 actionsMouseActionsand input dispatcherCodebase Reference
I can provide:
MprView.javaMprViewTransferHandler.javaDragSwapListener.javaImageViewerEventManager(Already attached below or will attach as needed.)
Help Requested
ActionW.DRAG_SWAPcleanly override existing defaults?Environment
If the maintainers need the exact files, I can attach them immediately.
Thank you for the guidance!
Beta Was this translation helpful? Give feedback.
All reactions