@eturnity/eturnity_3d 8.34.0 → 8.34.1
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
package/src/config.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
isPolygonInsidePolygon,
|
|
8
8
|
getConcaveOutlines,
|
|
9
9
|
} from '@eturnity/eturnity_maths'
|
|
10
|
-
import { fittingPanelsColorMap } from '../config'
|
|
10
|
+
import { defaultTextureColorMap, fittingPanelsColorMap } from '../config'
|
|
11
11
|
//this function just update the "roof" and "moduleField(s)" properties of panels,moduleFields and roofs
|
|
12
12
|
export function UpdateRoofModuleFieldRelations(state) {
|
|
13
13
|
let moduleFields = state.polygons.filter(
|
|
@@ -106,9 +106,12 @@ export function updateModuleFieldFittingPanels(moduleField) {
|
|
|
106
106
|
})
|
|
107
107
|
})
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
const
|
|
109
|
+
const hasCustomTexture = moduleField.pvData?.texture_img_url
|
|
110
|
+
const defaultTextureIndex = moduleField.pvData?.module_texture_version_id || 0
|
|
111
|
+
const color = hasCustomTexture
|
|
112
|
+
? moduleField.pvData?.backsheet_color
|
|
113
|
+
: defaultTextureColorMap[defaultTextureIndex]
|
|
114
|
+
const mappedColor = fittingPanelsColorMap[color || 'default']
|
|
112
115
|
|
|
113
116
|
moduleField.fittingPanels = {
|
|
114
117
|
polygons,
|