Skip to content

Commit 114330e

Browse files
committed
fix(datasetattributes, mapper): fix refactoring
coherence in choices + fix to have exact same behavior
1 parent df6db6f commit 114330e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Sources/Common/DataModel/DataSetAttributes/FieldData.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,13 @@ export function extend(publicAPI, model, initialValues = {}) {
197197

198198
macro.obj(publicAPI, model);
199199

200-
vtkFieldData(publicAPI, model);
201-
202200
// Decode serialized data if any
203201
if (initialValues.arrays) {
204202
initialValues.arrays = initialValues.arrays.map((item) => ({
205203
data: vtk(item.data),
206204
}));
207205
}
206+
vtkFieldData(publicAPI, model);
208207
}
209208

210209
// ----------------------------------------------------------------------------

Sources/Rendering/Core/Mapper/index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ function defaultValues(initialValues) {
600600
useInvertibleColors: false,
601601
invertibleScalars: null,
602602

603-
viewSpecificProperties: null,
603+
viewSpecificProperties: {},
604604

605605
customShaderAttributes: [],
606606
...initialValues,
@@ -639,10 +639,6 @@ export function extend(publicAPI, model, initialValues = {}) {
639639
]);
640640
macro.setGetArray(publicAPI, model, ['scalarRange'], 2);
641641

642-
if (!initialValues.viewSpecificProperties) {
643-
initialValues.viewSpecificProperties = {};
644-
}
645-
646642
CoincidentTopologyHelper.implementCoincidentTopologyMethods(publicAPI, model);
647643

648644
// Object methods

0 commit comments

Comments
 (0)