How to use the protvista-utils.TrackHighlighter function in protvista-utils

To help you get started, we’ve selected a few protvista-utils 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 ebi-webcomponents / nightingale / packages / protvista-zoomable / src / protvista-zoomable.js View on Github external
// this.bindEvents = this.bindEvents(this);
    let aboutToApply = false;
    // Postponing the zoom translation to the next frame.
    // This helps in case several attributes are changed almost at the same time,
    // in this way, only one refresh will be called.
    this.applyZoomTranslation = () => {
      if (aboutToApply) return;
      aboutToApply = true;
      requestAnimationFrame(() => {
        aboutToApply = false;
        this._applyZoomTranslation();
      });
    };
    this._onResize = this._onResize.bind(this);
    this._listenForResize = this._listenForResize.bind(this);
    this.trackHighlighter = new TrackHighlighter({ element: this, min: 1 });
  }

protvista-utils

Collection of utilities for ProtVista components

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis