@kitware/vtk.js 34.16.0 → 34.16.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.
|
@@ -45,16 +45,8 @@ function vtkDataSetAttributes(publicAPI, model) {
|
|
|
45
45
|
vtkWarningMacro(`Cannot set attribute ${attType}. Incorrect number of components.`);
|
|
46
46
|
return -1;
|
|
47
47
|
}
|
|
48
|
-
let currentAttribute = model[`active${attType}`];
|
|
49
|
-
if (currentAttribute >= 0 && currentAttribute < model.arrays.length) {
|
|
50
|
-
if (model.arrays[currentAttribute] === arr) {
|
|
51
|
-
return currentAttribute;
|
|
52
|
-
}
|
|
53
|
-
// FIXME setting an array actually changes its index
|
|
54
|
-
publicAPI.removeArrayByIndex(currentAttribute);
|
|
55
|
-
}
|
|
56
48
|
if (arr) {
|
|
57
|
-
currentAttribute = publicAPI.addArray(arr);
|
|
49
|
+
const currentAttribute = publicAPI.addArray(arr);
|
|
58
50
|
model[`active${attType}`] = currentAttribute;
|
|
59
51
|
} else {
|
|
60
52
|
model[`active${attType}`] = -1;
|