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

Setting arrowDirection to FPPopoverArrowDirectionLeft, arrow is right-pointing #30

Closed
markd2 opened this issue Dec 30, 2012 · 3 comments

Comments

@markd2
Copy link

markd2 commented Dec 30, 2012

Hi!

When I set FPPopoverArrowDirectionRight, my popover appears in the right place. If I use FPPopoverArrowDirectionLeft, it appears in the same place as FPPopoverArrowDirectionRight. There's plenty of room around the origin point.

Sample project at http://borkware.com/hacks/Popupinator.zip - pretty much just has a button in the middle of an ipad, and a segmented control that lets you choose the arrow direction.

I narrowed it down to bestArrowDirectionAndFrameFromView, the test

    if(wl == best_w || self.arrowDirection == FPPopoverArrowDirectionRight)

Is matching the wl==best_w, ignoring the arrowDirection setting.

Here's a snapshot from the debugger:

debugger-session

if there's anything else I can supply, please let me know. markd@borkware.com

Thanks!
++md

@alvises
Copy link
Owner

alvises commented Feb 23, 2013

Thank you very much for the code you are providing! I'm going to analyze this.

@alvises
Copy link
Owner

alvises commented Feb 23, 2013

Fixed! Was in that line of code

    if(wl == best_w || self.arrowDirection == FPPopoverArrowDirectionRight)

so if wl == best_w was ignoring the forcing of the direction

now is

    if((wl == best_w || self.arrowDirection == FPPopoverArrowDirectionRight) && self.arrowDirection != FPPopoverArrowDirectionLeft)

Screen Shot 2013-02-23 at 17 49 27

@alvises
Copy link
Owner

alvises commented Feb 23, 2013

I'm committing, I have put your github id under contributors, thanks

@alvises alvises closed this as completed Feb 23, 2013
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

2 participants