Skip to content

Commit

Permalink
[docs] Added referenceObject example
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Zivolo committed Apr 28, 2017
1 parent 3523662 commit b6d5b46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/_includes/popper-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ this object get passed to modifiers and to the <code>onCreate</code> and <code>o
<dd><p>The <code>referenceObject</code> is an object that provides an interface compatible with Popper.js
and lets you use it as replacement of a real DOM node.
You can use this method to position a popper relatively to a set of coordinates
in case you don&#39;t have a DOM node to use as reference.
NB: This feature isn&#39;t supported in Internet Explorer 10</p>
in case you don&#39;t have a DOM node to use as reference.</p>
<pre><code>new Popper(referenceObject, popperNode);
</code></pre><p>NB: This feature isn&#39;t supported in Internet Explorer 10</p>
</dd>
</dl>

Expand Down Expand Up @@ -711,6 +712,11 @@ The `referenceObject` is an object that provides an interface compatible with Po
and lets you use it as replacement of a real DOM node.
You can use this method to position a popper relatively to a set of coordinates
in case you don't have a DOM node to use as reference.

```
new Popper(referenceObject, popperNode);
```

NB: This feature isn't supported in Internet Explorer 10

**Kind**: global variable
Expand Down
5 changes: 5 additions & 0 deletions src/popper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export default class Popper {
* and lets you use it as replacement of a real DOM node.
* You can use this method to position a popper relatively to a set of coordinates
* in case you don't have a DOM node to use as reference.
*
* ```
* new Popper(referenceObject, popperNode);
* ```
*
* NB: This feature isn't supported in Internet Explorer 10
* @name referenceObject
* @property {Function} data.getBoundingClientRect A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.
Expand Down

0 comments on commit b6d5b46

Please sign in to comment.