Opened 9 years ago

Closed 7 years ago

Last modified 6 years ago

#5937 closed feature (fixed)

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

Change History (11)

comment:1 Changed 9 years ago by Jörn Zaefferer

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.

comment:2 Changed 9 years ago by T.Lindig

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.

comment:3 Changed 8 years ago by Scott González

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

comment:4 Changed 8 years ago by Scott González

#7243 is a duplicate of this ticket.

comment:5 Changed 8 years ago by collin

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

comment:7 Changed 7 years ago by Scott González

Milestone: TBD1.9
Priority: minormajor
Status: newopen

comment:8 Changed 7 years ago by Jörn Zaefferer

Resolution: fixed
Status: openclosed

comment:9 Changed 6 years ago by meyertee

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

comment:10 Changed 6 years ago by Scott González

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.

comment:11 Changed 6 years ago by meyertee

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

Last edited 6 years ago by meyertee (previous) (diff)
Note: See TracTickets for help on using tickets.