Page 1 of 1

How to set position

PostPosted: 20 Jul 2015 18:17
by mka
Hello!
I have tried many different ways, but I can't find the right way to set the position.

function ($menu,x,y){
???????????
}

Re: How to set position

PostPosted: 20 Jul 2015 18:23
by Alexander Bulei
Hi mka,

Please explain better, what you want to do.

Best Regards.

Re: How to set position

PostPosted: 20 Jul 2015 18:26
by mka
I just want to know the syntax. E.g. what should I write to get the context menu to popup at x: 200 and y: 350 ?
I couldn't find anythin about context menu's in the documentation either?

Re: How to set position

PostPosted: 20 Jul 2015 18:49
by mka
I want to fine-adjust the position so it always popup's underneath and with the left side aligned with the button's left edge.

contextmenu.png

Re: How to set position

PostPosted: 21 Jul 2015 10:51
by Alexander Bulei
Hi mka,

If you assign the OnPosition event, you should set the position of popup by yourself, and only by javascript, in other words, you should use OnPosition.Script property.

To set the position, you can use the Jquery UI Utility or javascript/jquery:

javascript code
$menu.$menu.css({top: 123, left: 123});}


Parameters X and Y = cursor/click point coordinates

Best Regards.

Re: How to set position

PostPosted: 21 Jul 2015 14:56
by mka
Thank you very much.