@eturnity/eturnity_maths 6.34.1 → 6.34.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_maths",
3
- "version": "6.34.1",
3
+ "version": "6.34.3",
4
4
  "author": "Eturnity Team",
5
5
  "main": "src/index.js",
6
6
  "private": false,
@@ -119,12 +119,20 @@ export class Polygon {
119
119
  version: this.version,
120
120
  name: this.name,
121
121
  type: this.type,
122
- outline: this.outline.map(p=>{return {...p}}),
122
+ outline: this.outline.map(p=>{return {
123
+ x:parseInt(p.x),
124
+ y:parseInt(p.y),
125
+ z:parseInt(p.z),
126
+ }}),
123
127
  holes: this.holes.map((p) => p.id),
124
128
  layer: this.layer,
125
129
  highlight: this.highlight,
126
130
  visible: this.visible,
127
- margins: JSON.parse(JSON.stringify(this.margins))
131
+ margins: {
132
+ isSameMargin:this.margins.isSameMargin,
133
+ sameMargin:this.margins.sameMargin,
134
+ distances:JSON.parse(JSON.stringify(this.margins.distances))
135
+ }
128
136
  }
129
137
  const extraSerialization = {}
130
138
  if (this.layer == 'roof') {
@@ -140,15 +148,16 @@ export class Polygon {
140
148
  return { id: roof.id }
141
149
  })
142
150
  } else if (this.layer == 'moduleField') {
143
- extraSerialization.data = {...this.data}
151
+ extraSerialization.data = {...this.data,modules:[]}
144
152
  extraSerialization.roof = { id: this.roof.id }
145
153
  extraSerialization.pvData = this.pvData?{...this.pvData}:null
146
154
  extraSerialization.mountingData = this.mountingData?{...this.mountingData}:null
147
- extraSerialization.panels = this.panels
148
- ? this.panels.map((p) => {
149
- return { id: p.id, index: p.index, outline: p.outline }
150
- })
151
- : []
155
+ extraSerialization.panels = []
156
+ // this.panels
157
+ // ? this.panels.map((p) => {
158
+ // return { id: p.id, index: p.index, outline: p.outline }
159
+ // })
160
+ // : []
152
161
  extraSerialization.userDeactivatedPanels = this.userDeactivatedPanels
153
162
  ? this.userDeactivatedPanels.map((p) => {
154
163
  return { id: p.id, index: p.index, outline: p.outline }