@eturnity/eturnity_maths 9.10.0 → 9.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/objects/Polygon.js +4 -2
package/package.json
CHANGED
package/src/objects/Polygon.js
CHANGED
|
@@ -383,7 +383,9 @@ export class Polygon {
|
|
|
383
383
|
extraSerialization.data = {
|
|
384
384
|
...this.data,
|
|
385
385
|
}
|
|
386
|
-
|
|
386
|
+
if (this.roof) {
|
|
387
|
+
extraSerialization.roof = { id: this.roof.id }
|
|
388
|
+
}
|
|
387
389
|
extraSerialization.pvData = this.pvData ? { ...this.pvData } : null
|
|
388
390
|
extraSerialization.mountingData = this.mountingData
|
|
389
391
|
? { ...this.mountingData }
|
|
@@ -444,7 +446,7 @@ export class Polygon {
|
|
|
444
446
|
}
|
|
445
447
|
return {
|
|
446
448
|
module_field_uuid: this.id,
|
|
447
|
-
roof_uuid: this.roof.id,
|
|
449
|
+
roof_uuid: this.roof ? this.roof.id : null,
|
|
448
450
|
version: this.version,
|
|
449
451
|
module_field_outline: this.outline.map((v) => [v.x, v.y, v.z]),
|
|
450
452
|
col_spacing_mm: this.data.col_spacing_mm,
|