From abed223c5a6025aaac6a4235e3fd92ebbd9162a6 Mon Sep 17 00:00:00 2001 From: Rehili Ghazwa Date: Tue, 12 Mar 2024 18:38:35 +0100 Subject: [PATCH] rename branchStatus to operatingStatus --- .../network-map-viewer/network/line-layer.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/network-map-viewer/network/line-layer.js b/src/components/network-map-viewer/network/line-layer.js index 20ed193e..da2fd760 100644 --- a/src/components/network-map-viewer/network/line-layer.js +++ b/src/components/network-map-viewer/network/line-layer.js @@ -279,7 +279,7 @@ export class LineLayer extends CompositeLayer { }); linesStatus.set(line.id, { - branchStatus: line.branchStatus, + operatingStatus: line.operatingStatus, }); const key = this.genLineKey(line); @@ -304,7 +304,7 @@ export class LineLayer extends CompositeLayer { terminal2Connected: line1.terminal2Connected, }); linesStatus.set(line1.id, { - branchStatus: line1.branchStatus, + operatingStatus: line1.operatingStatus, }); }); } @@ -425,13 +425,13 @@ export class LineLayer extends CompositeLayer { ) { //add icons compositeData.forEach((compositeData) => { - compositeData.branchStatus = []; + compositeData.operatingStatus = []; compositeData.lines.forEach((line) => { let lineStatus = linesStatus.get(line.id); if ( lineStatus !== undefined && - lineStatus.branchStatus !== undefined && - lineStatus.branchStatus !== 'IN_OPERATION' + lineStatus.operatingStatus !== undefined && + lineStatus.operatingStatus !== 'IN_OPERATION' ) { let lineData = compositeData.lineMap.get(line.id); let coordinatesIcon = @@ -447,8 +447,8 @@ export class LineLayer extends CompositeLayer { line.proximityFactorEnd ); if (coordinatesIcon !== null) { - compositeData.branchStatus.push({ - status: lineStatus.branchStatus, + compositeData.operatingStatus.push({ + status: lineStatus.operatingStatus, printPosition: [ coordinatesIcon.position.longitude, coordinatesIcon.position.latitude, @@ -949,17 +949,17 @@ export class LineLayer extends CompositeLayer { // line status const lineStatusIconLayer = new IconLayer( this.getSubLayerProps({ - id: 'BranchStatus' + compositeData.nominalV, - data: compositeData.branchStatus, + id: 'OperatingStatus' + compositeData.nominalV, + data: compositeData.operatingStatus, // The position passed to this layer causes a bug when zooming and maxParallelOffset is reached: // the icon is not correctly positioned on the lines, they are slightly off. // In the custom layers, we clamp the distanceBetweenLines. This is not done in the deck.gl TextLayer // and IconLayer or in the position calculated here. - getPosition: (branchStatus) => branchStatus.printPosition, - getIcon: (branchStatus) => getLineIcon(branchStatus.status), + getPosition: (operatingStatus) => operatingStatus.printPosition, + getIcon: (operatingStatus) => getLineIcon(operatingStatus.status), getSize: this.props.iconSize, getColor: () => this.props.labelColor, - getPixelOffset: (branchStatus) => branchStatus.offset, + getPixelOffset: (operatingStatus) => operatingStatus.offset, visible: (!this.props.filteredNominalVoltages || this.props.filteredNominalVoltages.includes(