UNPKG

ncats-protvista-viewer

Version:

A collection of nightingale and custom components to show details of a protein sequence

26 lines (24 loc) 1.47 kB
import ProtVistaManager from "protvista-manager"; import ProtvistaTrack from "protvista-track"; import ProtVistaNavigation from "protvista-navigation"; import NcatsSequenceLogo from "./ncats-sequence-logo"; import ProtvistaTooltip from "protvista-tooltip"; import {NcatsProtVistaLegend} from "./legend"; import {NcatsProtVistaViewer} from "./viewer"; const loadComponent = () => { window.customElements.get('protvista-manager') || window.customElements.define('protvista-manager', ProtVistaManager); window.customElements.get('protvista-navigation') || window.customElements.define('protvista-navigation', ProtVistaNavigation); window.customElements.get('protvista-track') || window.customElements.define('protvista-track', ProtvistaTrack); window.customElements.get('protvista-tooltip') || window.customElements.define('protvista-tooltip', ProtvistaTooltip); window.customElements.get('ncats-sequence-logo') || window.customElements.define('ncats-sequence-logo', NcatsSequenceLogo); window.customElements.get('ncats-protvista-viewer') || window.customElements.define('ncats-protvista-viewer', NcatsProtVistaViewer); window.customElements.get('ncats-protvista-legend') || window.customElements.define('ncats-protvista-legend', NcatsProtVistaLegend); }; // Conditional loading of polyfill if (window.customElements) { loadComponent(); } else { document.addEventListener("WebComponentsReady", () => { loadComponent(); }); }