angular-ui/bootstrap — pull request #326 by pkozlowski-opensource (2013-04-15 19:34:47+00:00)
Title: New positioning service + typeahead fixes

@angular-ui/bootstrap I was so fed up with the positioning issues we are having for tooltips, popovers and typeahead that I've created a new `$position` service that allows us to calculate coordinate of elements in relation to other elements. Have a look at the code.

There are 2 commits in this PR: the service itself and its usage in the `typeahead` directive.

The only problem is testing of this DOM positioning craziness. I've created a test page that aids with visual testing but really not sure how to create unit tests for this. It should be possible if we would base it on comparing position of 2 elements... but it would mean attaching all the elements to the document - this would slow down tests and I'm not sure how reliable it can be.

@joshdmiller I think that we can fix all the open tickets for tooltips / popovers with this new service so it would be awesome if you could have a look at it.