Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Duberstein committed Sep 9, 2019
1 parent 3f27ce9 commit bbc4c90
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/api-reference/deck.md
Expand Up @@ -154,29 +154,31 @@ Extra pixels around the pointer to include while picking. This is helpful when r

#### `getTooltip` (Function, optional)

Function that takes a hovered-over point and displays a tooltip.
Callback that takes a hovered-over point and renders a tooltip. If the prop is not specified, the tooltip is hidden.

If the function returns `null`, the tooltip is hidden, with the CSS `display` property set to `none`.
If the function returns a string, that string is rendered in a tooltip with the default CSS styling described below.
Otherwise, the function can return an object with the following fields:
Callback arguments:

* `info` - the [picking info](/docs/developer-guide/interactivity.md#the-picking-info-object) describing the object being hovered.

If the callback returns `null`, the tooltip is hidden, with the CSS `display` property set to `none`.
If the callback returns a string, that string is rendered in a tooltip with the default CSS styling described below.
Otherwise, the callback can return an object with the following fields:

* `text` (String, optional) - Specifies the `innerText` attribute of the tooltip.
* `html` (String, optional) - Specifies the `innerHTML` attribute of the tooltip. Note that this will override the specified `innerText`.
* `className` (String, optional) - Class name to attach to the tooltip element.
* `className` (String, optional) - Class name to attach to the tooltip element. The element has the default class name of `deck-tooltip`.
* `style` (Object, optional) - An object of CSS styles to apply to the tooltip element, which can override the default styling.

By default, the tooltip has the following CSS style:

```css
z-index: 1;
position: 'absolute';
position: absolute;
color: #a0a7b4;
background-color: #29323c;
padding: 10px;
```

The element also has the default class name of `deck-tooltip`.

##### `useDevicePixels` (Boolean, optional)

When true, device's full resolution will be used for rendering, this value can change per frame, like when moving windows between screens or when changing zoom level of the browser.
Expand Down

0 comments on commit bbc4c90

Please sign in to comment.