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

add dynamicPlacement tooltip option #8398

Closed
wants to merge 1 commit into from
Closed

add dynamicPlacement tooltip option #8398

wants to merge 1 commit into from

Conversation

cvrebert
Copy link
Collaborator

@cvrebert cvrebert commented Jul 6, 2013

In light of @nickroberts having had to wait ~5 months to get action on his pull request from @fat, I've taken the liberty of porting (with some cosmetic code changes) #6848 to the current latest 3.0.0-wip, to save him the trouble.

The automated tests still pass and it indeed seems to work based on limited manual testing.

@ncatanchin
Copy link

Would this also work for popover by extension?

@cvrebert
Copy link
Collaborator Author

cvrebert commented Jul 9, 2013

@ncatanchin As with the original pull request, indeed it does.

@cvrebert
Copy link
Collaborator Author

cvrebert commented Jul 9, 2013

Worthy alternative: #7996

@fat
Copy link
Member

fat commented Jul 24, 2013

why not just piggy back on the placement option?

placement: dynamic or auto or something

@@ -1167,6 +1168,29 @@
var actualWidth = $tip[0].offsetWidth
var actualHeight = $tip[0].offsetHeight

if (this.options.dynamicPlacement) {
var con = this.$element.parent()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

con?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$parent is a better name

This is a port to the latest 3.0.0-wip (with some cosmetic code changes)
of #6848
by Nick Roberts <nick@utropicmedia.com> (@nickroberts)
@cvrebert
Copy link
Collaborator Author

@fat: Because, as currently written, it uses placement to determine whether the tooltip should be horizontally or vertically placed (and the "preferred" placement direction).

@fat
Copy link
Member

fat commented Jul 24, 2013

got a version of this in 3.0.0 - thanks

@fat fat closed this Jul 24, 2013
@cvrebert
Copy link
Collaborator Author

217eb98 Cool.

@cvrebert cvrebert deleted the dynamic-placement branch July 24, 2013 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants