Skip to content

Commit df6db6f

Browse files
committed
fix(coordinate, hardwareselector): fix refactoring
fix refactoring
1 parent d4def46 commit df6db6f

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Sources/Rendering/Core/Coordinate/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function vtkCoordinate(publicAPI, model) {
3333
throw new RangeError('Invalid number of values for array setter');
3434
}
3535
let changeDetected = false;
36+
// Instanciation time : if model.value is undefined, change needs to be done
3637
if (model.value) {
3738
model.value.forEach((item, index) => {
3839
if (item !== array[index]) {

Sources/Rendering/Core/HardwareSelector/index.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@ import vtkDataSet from 'vtk.js/Sources/Common/DataModel/DataSet';
33

44
const { FieldAssociations } = vtkDataSet;
55

6-
// ----------------------------------------------------------------------------
7-
// Object factory
8-
// ----------------------------------------------------------------------------
9-
10-
function defaultValues(initialValues) {
11-
return {
12-
fieldAssociation: FieldAssociations.FIELD_ASSOCIATION_CELLS,
13-
captureZValues: false,
14-
...initialValues,
15-
};
16-
}
17-
186
// ----------------------------------------------------------------------------
197
// vtkHardwareSelector methods
208
// ----------------------------------------------------------------------------
@@ -43,6 +31,18 @@ function vtkHardwareSelector(publicAPI, model) {
4331
};
4432
}
4533

34+
// ----------------------------------------------------------------------------
35+
// Object factory
36+
// ----------------------------------------------------------------------------
37+
38+
function defaultValues(initialValues) {
39+
return {
40+
fieldAssociation: FieldAssociations.FIELD_ASSOCIATION_CELLS,
41+
captureZValues: false,
42+
...initialValues,
43+
};
44+
}
45+
4646
// ----------------------------------------------------------------------------
4747

4848
export function extend(publicAPI, model, initialValues = {}) {

0 commit comments

Comments
 (0)