react-globe.gl 2.32.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -402,6 +402,7 @@ ReactDOM.render(
402
402
  | <b>htmlLng</b> | <i>number</i>, <i>string</i> or <i>func</i> | `lng` | HTML element accessor function, attribute or a numeric constant for the longitude coordinate of the element's central position. |
403
403
  | <b>htmlAltitude</b> | <i>number</i>, <i>string</i> or <i>func</i> | 0 | HTML element accessor function, attribute or a numeric constant for the altitude coordinate of the element's position, in terms of globe radius units. |
404
404
  | <b>htmlElement</b> | <i>string</i> or <i>func</i> | `null` | Accessor function or attribute to retrieve the DOM element to use. Should return an instance of [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement). |
405
+ | <b>htmlElementVisibilityModifier</b> | <i>func(elem, isVisible)</i> | - | Custom function that defines how elements are shown/hidden according to whether they are in front or behind the globe. The function receives two arguments `(elem, isVisible)`, the HTML element and a boolean indicating if the element should be visible. By default the Three object itself is automatically hidden when behind the globe. |
405
406
  | <b>htmlTransitionDuration</b> | <i>number</i> | 1000 | Duration (ms) of the transition to animate HTML elements position changes. A value of `0` will move the elements immediately to their final position. |
406
407
 
407
408
  ### 3D Objects Layer
@@ -254,6 +254,7 @@ interface GlobeProps extends ConfigOptions {
254
254
  htmlLng?: ObjAccessor<number>;
255
255
  htmlAltitude?: ObjAccessor<number>;
256
256
  htmlElement?: string | ((d: object) => HTMLElement);
257
+ htmlElementVisibilityModifier?: (el: HTMLElement, isVisible: boolean) => void;
257
258
  htmlTransitionDuration?: number;
258
259
 
259
260
  // 3D Objects layer