@eturnity/eturnity_maths 6.48.2 → 6.48.3
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 +9 -3
package/package.json
CHANGED
package/src/objects/Polygon.js
CHANGED
|
@@ -150,17 +150,23 @@ export class Polygon {
|
|
|
150
150
|
})
|
|
151
151
|
} else if (this.layer == 'moduleField') {
|
|
152
152
|
const modules=[]
|
|
153
|
-
this.panels
|
|
153
|
+
if(this.panels){
|
|
154
|
+
this.panels.forEach((p) => {
|
|
154
155
|
modules.push({ id: p.id, index: p.index, outline: p.outline, status: p.status || "active" })
|
|
155
156
|
})
|
|
156
|
-
|
|
157
|
+
}
|
|
158
|
+
if(this.userDeactivatedPanels){
|
|
159
|
+
this.userDeactivatedPanels.forEach((p) => {
|
|
157
160
|
modules.push({ id: p.id, index: p.index, outline: p.outline, status: p.status || "user_deactivated" })
|
|
158
161
|
})
|
|
159
|
-
|
|
162
|
+
}
|
|
163
|
+
extraSerialization.data = {...this.data,modules:[...this.data.modules]}
|
|
160
164
|
extraSerialization.roof = { id: this.roof.id }
|
|
161
165
|
extraSerialization.pvData = this.pvData?{...this.pvData}:null
|
|
162
166
|
extraSerialization.mountingData = this.mountingData?{...this.mountingData}:null
|
|
163
167
|
extraSerialization.modules = modules
|
|
168
|
+
extraSerialization.needsOptimisation = this.needsOptimisation
|
|
169
|
+
|
|
164
170
|
} else if (this.layer == 'panel') {
|
|
165
171
|
extraSerialization.index = this.index
|
|
166
172
|
extraSerialization.moduleField = { id: this.moduleField.id }
|