Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
f9ffb499
Commit
f9ffb499
authored
Jul 06, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor/reformat Tooltip.getPosition per @fat's feedback
parent
1ce5e9f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
js/tooltip.js
js/tooltip.js
+8
-4
No files found.
js/tooltip.js
View file @
f9ffb499
...
...
@@ -316,16 +316,20 @@
Tooltip
.
prototype
.
getPosition
=
function
(
$element
)
{
$element
=
$element
||
this
.
$element
var
el
=
$element
[
0
]
var
isBody
=
el
.
tagName
==
'
BODY
'
var
isSvg
=
window
.
SVGElement
&&
el
instanceof
window
.
SVGElement
var
isSvg
=
window
.
SVGElement
&&
el
instanceof
window
.
SVGElement
var
elRect
=
typeof
el
.
getBoundingClientRect
==
'
function
'
?
el
.
getBoundingClientRect
()
:
null
var
elOffset
=
isBody
?
{
top
:
0
,
left
:
0
}
:
$element
.
offset
()
var
scroll
=
{
scroll
:
isBody
?
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
:
$element
.
scrollTop
()
}
var
outerDims
=
isSvg
?
{}
:
{
width
:
isBody
?
$
(
window
).
width
()
:
$element
.
outerWidth
(),
height
:
isBody
?
$
(
window
).
height
()
:
$element
.
outerHeight
()
}
return
$
.
extend
({},
(
typeof
el
.
getBoundingClientRect
==
'
function
'
)
?
el
.
getBoundingClientRect
()
:
null
,
{
scroll
:
isBody
?
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
:
$element
.
scrollTop
()
},
outerDims
,
isBody
?
{
top
:
0
,
left
:
0
}
:
$element
.
offset
())
return
$
.
extend
({},
elRect
,
scroll
,
outerDims
,
elOffset
)
}
Tooltip
.
prototype
.
getCalculatedOffset
=
function
(
placement
,
pos
,
actualWidth
,
actualHeight
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment