This is an automated email from the ASF dual-hosted git repository.
hugoferreira 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 cec2b62d4b Added offsetX and Y for the ContextMenu bead
cec2b62d4b is described below
commit cec2b62d4b5dda2708c1f2aec7ad0e74cbb3f0c5
Author: Hugo Ferreira <[email protected]>
AuthorDate: Thu Apr 20 11:06:08 2023 +0100
Added offsetX and Y for the ContextMenu bead
The ContextMenu bead does not position correctly within a Jewel Wizard Page
and therefore we have to pass information about the value to be discounted (so
far it was the best workaround I have found)
---
.../src/main/royale/org/apache/royale/html/beads/ContextMenu.as | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContextMenu.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContextMenu.as
index b841c4b35b..53469152a2 100644
---
a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContextMenu.as
+++
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/ContextMenu.as
@@ -44,6 +44,9 @@ package org.apache.royale.html.beads
private var menu:UIBase;
public static const SHOW:String = "show";
+
+ public var offsetX:int = 0;
+ public var offsetY:int = 0;
public function set content(value:Array):void
{
@@ -75,7 +78,7 @@ package org.apache.royale.html.beads
{
event.preventDefault();
- var normalized:Array = normalizePosition(event.clientX,
event.clientY);
+ var normalized:Array = normalizePosition(event.clientX -
offsetX, event.clientY - offsetY);
var contextMenus:NodeList =
document.querySelectorAll('.context-menu');
contextMenus.forEach(function(element:Element):void