Skip to content

Commit

Permalink
Merge branch 'main' into fix_tsc_eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennehomer committed Feb 26, 2024
2 parents 9681814 + a3bc66f commit 5ee69d6
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/single-line-diagram-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,23 @@ export interface SLDMetadataNode {
equipmentId: string;
}

export interface SLDMetadataComponentSize {
width: number;
height: number;
}

export interface SLDMetadataComponent {
type: string;
vid: string;
anchorPoints: unknown[];
size: SLDMetadataComponentSize;
transformations: unknown;
styleClass: string;
}

//models just the metadata subelements that are actually used(nodes)
export interface SLDMetadata {
components: unknown[];
components: SLDMetadataComponent[];
nodes: SLDMetadataNode[];
wires: unknown[];
lines: unknown[];
Expand Down Expand Up @@ -432,7 +446,7 @@ export class SingleLineDiagramViewer {
const feederWidth =
this.svgMetadata?.components.find(
(comp) => comp.type === element.componentType
).size.width || 0;
)?.size.width || 0;
this.createSvgArrow(
elementById,
element.direction,
Expand Down

0 comments on commit 5ee69d6

Please sign in to comment.