Skip to main content

Search and Top Navigation

#5937 closed feature (fixed)

Opened August 12, 2010 04:58PM UTC

Closed April 24, 2012 03:32PM UTC

Last modified February 27, 2013 11:20AM UTC

Position: Add ability to determine if the element is flipped

Reported by: T.Lindig Owned by:
Priority: major Milestone: 1.9.0
Component: ui.position Version: 1.8.4
Keywords: Cc:
Blocked by: Blocking:
Description

For my tooltip implementation i need to know, if the positioned element was flipped or better in which direction it is shown. So it would be helpful, if the positions-plugin could add a css marker on his element depending on the calculated position top, left, right or bottom.

In according to the ''my''-option may be a combination of css-classes like this:

''ui-position-my-bottom ui-position-my-left''

or

''ui-position-my-top ui-position-my-right''

Attachments (0)
Change History (11)

Changed August 13, 2010 08:58AM UTC by jzaefferer comment:1

Providing feedback about the positioning result is definitely a good idea. We've got the using-callback, but that requires to implement the actual positioning to work. We could add a info-only callback, or something like additional classes. The latter poses the difficulty of removing older classes when repositioning.

Changed August 16, 2010 02:22PM UTC by T.Lindig comment:2

removing older classes when repositioning is not difficulty, if we remove ever all the additional classes before we repositioning. my be that is not the solution with the best performance, but it would be easy and clean.

Changed March 21, 2011 04:57PM UTC by scottgonzalez comment:3

summary: css marker at position-element, which direction it was flippedPosition: Add ability to determine if the element is flipped

Changed April 12, 2011 04:38PM UTC by scottgonzalez comment:4

#7243 is a duplicate of this ticket.

Changed April 19, 2011 08:42PM UTC by collin comment:5

Design wise this would be extremely useful. For example, in using position on elements that have directional design pieces, such as an arrow. One must know side the positioned element is on.

I mentioned this the other month on the forums too (I must have overlooked this ticket): http://forum.jquery.com/topic/position-api-redesign#14737000002025210

Changed July 08, 2011 12:56AM UTC by bmsterling comment:6

Changed October 27, 2011 06:11PM UTC by scottgonzalez comment:7

milestone: TBD1.9
priority: minormajor
status: newopen

Changed April 24, 2012 03:32PM UTC by jzaefferer comment:8

resolution: → fixed
status: openclosed

Fixed in db72cb7e944552ee54854834e3a73602f1f4818a

Changed February 26, 2013 06:41PM UTC by meyertee comment:9

Was this ever released? I can't seem to find it anywhere in the code nor documentation..

Changed February 26, 2013 06:59PM UTC by scottgonzalez comment:10

As the ticket milestone says, it was released in 1.9.0. It's documented in the position API page (see the using parameter) and was fully documented in the 1.9 upgrade guide. The comment immediately before yours also lists the commit in which the code was added.

Changed February 27, 2013 11:20AM UTC by meyertee comment:11

_comment0: Ok, found it.. for anyone else ending up here: there's a discussion over at github on why this was never merged.. https://github.com/jquery/jquery-ui/pull/3901361964069005511
_comment1: Ok, found it.. for anyone else ending up here: there's a discussion over at github on why this was reversed.. https://github.com/jquery/jquery-ui/pull/3901361964170533965

Oh sorry, I got confused.. so it was implemented with an argument to the using function. Brilliant, I was looking for the wrong thing.