You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2022/08/28 07:00:16 UTC
[royale-asjs] branch develop updated: Make sure drag controller gets event that initiated dreg
This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new ca19f3a699 Make sure drag controller gets event that initiated dreg
ca19f3a699 is described below
commit ca19f3a699fef8dfec52b12f9579f18722cd540b
Author: Yishay Weiss <yi...@mcafee.com>
AuthorDate: Sat Aug 27 23:52:26 2022 -0700
Make sure drag controller gets event that initiated dreg
---
.../MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as
index 91101ac869..55e8dbdbb9 100644
--- a/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as
+++ b/frameworks/projects/MXRoyaleBase/src/main/royale/mx/managers/DragManagerImpl.as
@@ -383,8 +383,10 @@ public class DragManagerImpl extends EventDispatcher implements IDragManager, IB
if (!dragController)
{
dragController = new DragMouseController();
+ (dragInitiator as IStrand).addBead(dragController);
+ // Give controller a chance to react to this event
+ (dragInitiator as IEventDispatcher).dispatchEvent(mouseEvent);
}
- (dragInitiator as IStrand).addBead(dragController);
this.dragInitiator = dragInitiator;
dragController.addEventListener("dragMove", dragMoveHandler)
dragController.addEventListener("dragStart", dragStartHandler)