How to use the @bentley/ui-components.ViewportComponentEvents.onViewRotationChangeEvent function in @bentley/ui-components

To help you get started, we’ve selected a few @bentley/ui-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / ui / framework / src / ui-framework / navigationaids / DrawingNavigationAid.tsx View on Github external
public componentWillUnmount() {
    ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);
    window.removeEventListener("mousedown", this._handleMouseDown as any);
    window.removeEventListener("mouseup", this._handleMouseDragEnd as any);
    window.removeEventListener("mousemove", this._handleMouseDrag as any);
    window.removeEventListener("keyup", this._handleKeyUp as any);
    clearTimeout(this._animationFrame);
    if (this.props.onAnimationEnd)
      this.props.onAnimationEnd();

    const rt = document.getElementById("drawing-portal") as HTMLDivElement;
    if (rt && rt.parentElement !== null && rt.children.length === 0) {
      rt.parentElement.removeChild(rt);
    }
    this._mounted = false;
  }
github imodeljs / imodeljs / ui / framework / src / ui-framework / navigationaids / CubeNavigationAid.tsx View on Github external
public componentWillUnmount() {
    ViewportComponentEvents.onViewRotationChangeEvent.removeListener(this._handleViewRotationChangeEvent);
    clearTimeout(this._animationFrame);
    this._mounted = false;
  }