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 comment:1
Changed August 16, 2010 02:22PM UTC by 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 comment:3
summary: | css marker at position-element, which direction it was flipped → Position: Add ability to determine if the element is flipped |
---|
Changed April 19, 2011 08:42PM UTC by 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 comment:6
Added a commit for this: https://github.com/bmsterling/jquery-ui/commit/6420e57e84cc8aa13b6d529b6d9e86830780fc88
Changed October 27, 2011 06:11PM UTC by comment:7
milestone: | TBD → 1.9 |
---|---|
priority: | minor → major |
status: | new → open |
Changed April 24, 2012 03:32PM UTC by comment:8
resolution: | → fixed |
---|---|
status: | open → closed |
Fixed in db72cb7e944552ee54854834e3a73602f1f4818a
Changed February 26, 2013 06:41PM UTC by 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 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 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/390 → 1361964069005511 |
---|---|
_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/390 → 1361964170533965 |
Oh sorry, I got confused.. so it was implemented with an argument to the using function. Brilliant, I was looking for the wrong thing.
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.