Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu.setLocation(...) has no effect in Tabris 2.x #480

Closed
mkempka opened this issue Oct 5, 2020 · 3 comments
Closed

Menu.setLocation(...) has no effect in Tabris 2.x #480

mkempka opened this issue Oct 5, 2020 · 3 comments

Comments

@mkempka
Copy link
Member

mkempka commented Oct 5, 2020

Back in Tabris 1.x Menu.setLocation(...) would move the menu to a point on the screen. This only worked on iPad.

In Tabris 2.x this doesn’t have any effect any more. Instead the menu always shows up in the center of the display. Please restore the location behavior from Tabris 1.x, so that we can use the menu entries like this again:
Screen Shot 2014-12-01 at 14 52 59

@patrykmol
Copy link

Action sheet's presenter has sourceRect property we could use to enable manipulation of position. Setting this will make action sheet appear somewhere around the specified rect. We would have to make new APIs for this.

@cpetrov
Copy link
Member

cpetrov commented Oct 5, 2020

As discussed with @ifurnadjiev: If it was Tabris 3.x (js), you could have positioned the popup according to the action's absoluteBounds: https://docs.tabris.com/latest/api/Widget.html#absolutebounds

However, backporting this feature to 2.x and exposing this API to Tabris might require some effort.

@patrykmol
Copy link

I have implemented undocumented property sourceRect on ActionSheet. It expects Bounds type https://docs.tabris.com/latest/types.html#bounds. It should be set before opening the action sheet.

Link to iOS' sourceRect doc: https://developer.apple.com/documentation/uikit/uipopoverpresentationcontroller/1622324-sourcerect?language=objc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants