src/projectStructure.js
/*
   * This function adds a building part to the current building part (according to this.currentBuildingDepth)
   * If there are no building parts in the buildings array, the part will be added to it
   * If the new building part to be added has the type 'Building', it will be directly appended to the project.buildings
   * array instead of being appended to the buildingParts array of the current element
   */
This function adds a building part to the current building part (according to this.currentBuildingDepth)
If there are no building parts in the buildings array, the part will be added to it
If the new building part to be added has the type 'Building', it will be directly appended to the project.buildings
array instead of being appended to the buildingParts array of the current element
This function adds a building part to the current building part ( according to this . currentBuildingDepth ) If there are no building parts in the buildings array the part will be added to it If the new building part to be added has the type ' Building ' it will be directly appended to the project . buildings array instead of being appended to the buildingParts array of the current element
addBuildingPartToBuildingPart (ID, name, type, defaultLine) {
    let target
    if (type === 'Building') {
      target = this.project.buildings
    } else {
      target = this.getCurrentBuildingPart(true)
    }
    target.push({
      ID: ID,
      name: name,
      type: type,
      defaultLine: defaultLine,
      deviceReferences: [],
      functions: [],
      buildingParts: []
    })
    this.currentBuildingDepth++
  }
addBuildingPartToBuildingPart ( ID , name , type , defaultLine ) { let target if ( type === 'Building' ) { target = this . project . buildings } else { target = this . getCurrentBuildingPart ( true ) } target . push ( { ID : ID , name : name , type : type , defaultLine : defaultLine , deviceReferences : [ ] , functions : [ ] , buildingParts : [ ] } ) this . currentBuildingDepth ++ }
This function adds a building part to the current building part (according to this.currentBuildingDepth)
 If there are no building parts in the buildings array, the part will be added to it
 If the new building part to be added has the type 'Building', it will be directly appended to the project.buildings
 array instead of being appended to the buildingParts array of the current element
This function adds a building part to the current building part ( according to this . currentBuildingDepth ) If there are no building parts in the buildings array the part will be added to it If the new building part to be added has the type ' Building ' it will be directly appended to the project . buildings array instead of being appended to the buildingParts array of the current element
// Get the correct push-target // Get the buildingParts array of the current building part // Increase the depth since one element was added