HoopsIFCRelationshipElement
-
class
wvc.HoopsIFCRelationshipElement() Provides a component for displaying IFC relationships in BIM models.
This component shows hierarchical relationships between IFC elements, allowing users to explore how building components relate to each other. It displays relationship types, element names, and provides navigation to related elements through selection.
The component automatically updates when selection changes and provides expandable/collapsible relationship groups with smooth animations (unless disabled).
Constructors
-
wvc.HoopsIFCRelationshipElement.constructor() - HoopsIFCRelationshipElement():
HoopsIFCRelationshipElementReturns:
HoopsIFCRelationshipElement
Properties
-
wvc.HoopsIFCRelationshipElement.styles static
styles: CSSResult[]Array of styles to apply to the element. The styles should be defined using the ? tag function, via constructible stylesheets, or imported from native CSS module scripts.
Note on Content Security Policy:
Element styles are implemented with
<style>tags when the browser doesn’t support adopted StyleSheets. To use such<style>tags with the style-src CSP directive, the style-src value must either include ‘unsafe-inline’ ornonce-<base64-value>with<base64-value>replaced be a server-generated nonce.To provide a nonce to use on generated
<style>elements, setwindow.litNonceto a server-generated nonce in your page’s HTML, before loading application code:<script> // Generated and unique per request: window.litNonce = 'a1b2c3d4'; </script>
-
wvc.HoopsIFCRelationshipElement.expandedRelationships - expandedRelationships: Record
-
wvc.HoopsIFCRelationshipElement.noAnim - noAnim: boolean
When true, animations will be disabled for this component
-
wvc.HoopsIFCRelationshipElement.selectionRelationships - selectionRelationships: (undefined |
RelationshipData[])
-
wvc.HoopsIFCRelationshipElement.service - service:
IIFCRelationshipsService
Methods
-
wvc.HoopsIFCRelationshipElement.disconnectedCallback() - disconnectedCallback(): void
Lifecycle callback when component is removed from the DOM.
Cleans up event listeners for IFC relationships service to prevent memory leaks.
Returns: void
-
wvc.HoopsIFCRelationshipElement.firstUpdated() - firstUpdated(): void
Lifecycle callback when component is first updated.
Initializes the IFC relationships service and sets up event listeners for relationship changes based on selection.
Returns: void
-
wvc.HoopsIFCRelationshipElement.isRelationshipExpanded() - isRelationshipExpanded(relationshipType: string): boolean
Checks whether a relationship group is currently expanded.
Parameters
relationshipType: string
The type name of the relationship to checkReturns: boolean
True if the relationship group is expanded, false otherwise
-
wvc.HoopsIFCRelationshipElement.render() - render(): TemplateResult
Renders the IFC relationships component template.
Creates a hierarchical display of IFC relationships based on current selection, with expandable groups and interactive elements for navigation.
Returns: TemplateResult
The HTML template for the IFC relationships panel
-
wvc.HoopsIFCRelationshipElement.toggleRelationship() - toggleRelationship(relationshipType: string): void
Toggles the expanded/collapsed state of a relationship group.
Controls the visibility of relationship elements within a specific relationship type, with smooth animations (unless disabled via no-anim attribute).
Parameters
relationshipType: string
The type name of the relationship to toggleReturns: void