@eturnity/eturnity_3d 8.34.3 → 8.34.5

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "8.34.3",
4
+ "version": "8.34.5",
5
5
  "files": [
6
6
  "dist",
7
7
  "src"
@@ -211,7 +211,7 @@ export async function hydratePolygons({
211
211
  })
212
212
 
213
213
  modules.forEach((module) => {
214
- const panel = new Polygon(module.outline, '')
214
+ let panel = new Polygon(module.outline, '')
215
215
  panel.id = module.module_uuid
216
216
  panel.gridIndex = module.gridIndex
217
217
  panel.row_index = module.row_index
@@ -223,12 +223,15 @@ export async function hydratePolygons({
223
223
  panel.poolGroupUuidColor = `#${panel.poolGroupUuid.slice(0, 6)}`
224
224
  }
225
225
  panel.available = true
226
+
226
227
  if (module.is_active) {
227
228
  panel.layer = 'panel'
229
+ panel = updateComputedGeometryPolygon(panel)
228
230
  MFpanels.push(panel)
229
231
  panels.push(panel)
230
232
  } else {
231
233
  panel.layer = 'user_deactivated_panel'
234
+ panel = updateComputedGeometryPolygon(panel)
232
235
  MFuserDeactivatedPanels.push(panel)
233
236
  userDeactivatedPanels.push(panel)
234
237
  }
@@ -203,12 +203,10 @@ const hexagonLayerGroup = L.layerGroup([hexagonLayerDop20, hexagonLayerDop10], {
203
203
  layerTypeAPI: 'bkgHexagonGermanyLayer',
204
204
  })
205
205
 
206
- const getHexagonLayer = (location = {}) => {
207
- const {
208
- country_short: country,
209
- administrative_area_level_1: administrativeAreaLevel,
210
- } = location
211
- const supportsDop10 = country === 'DE' && administrativeAreaLevel === 'NRW'
206
+ const getHexagonLayer = (location) => {
207
+ const supportsDop10 =
208
+ location?.country_short === 'DE' &&
209
+ location?.administrative_area_level_1 === 'NRW'
212
210
  return supportsDop10 ? hexagonLayerGroup : hexagonLayerDop20
213
211
  }
214
212