-
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow custom class to be applied in paper-tooltip
- Loading branch information
1 parent
2ec21e0
commit db3b46c
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Ember from 'ember'; | ||
const { get, ViewUtils } = Ember; | ||
|
||
// taken from https://github.com/kaliber5/ember-bootstrap/blob/master/addon/utils/get-parent.js | ||
export default function getParent(view) { | ||
if (get(view, 'tagName') === '') { | ||
// Beware: use of private API! :( | ||
if (ViewUtils && ViewUtils.getViewBounds) { | ||
return ViewUtils.getViewBounds(view).parentElement; | ||
} else { | ||
return view._renderNode.contextualElement; | ||
} | ||
} else { | ||
return get(view, 'element').parentNode; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters