How to use the terra-hookshot.Utils function in terra-hookshot

To help you get started, we’ve selected a few terra-hookshot 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 cerner / terra-framework / packages / terra-popup / src / Popup.jsx View on Github external
validateContentNode(node) {
    if (node) {
      const contentRect = Hookshot.Utils.getBounds(node);
      if (this.contentHeight !== contentRect.height || this.contentWidth !== contentRect.width) {
        this.contentHeight = contentRect.height;
        this.contentWidth = contentRect.width;
        this.forceUpdate();
      }
      this.isContentSized = true;
    }
  }
github cerner / terra-core / packages / terra-popup / src / Popup.jsx View on Github external
validateContentNode(node) {
    if (node) {
      const contentRect = Hookshot.Utils.getBounds(node);
      if (this.contentHeight !== contentRect.height || this.contentWidth !== contentRect.width) {
        this.contentHeight = contentRect.height;
        this.contentWidth = contentRect.width;
        this.forceUpdate();
      }
      this.isContentSized = true;
    }
  }

terra-hookshot

The Terra Hookshot component positions portaled content according to target and content attachments, ensuring they stay visually connected.

Apache-2.0
Latest version published 6 months ago

Package Health Score

54 / 100
Full package analysis