Skip to content

Commit 0c948b0

Browse files
jmannaufloryst
authored andcommitted
feat(DataArray): copy ranges in DataArray.deepCopy
1 parent 1618a20 commit 0c948b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Common/Core/DataArray/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,18 @@ function vtkDataArray(publicAPI, model) {
478478
return sortedObj;
479479
};
480480

481+
/**
482+
* @param {import("./index").vtkDataArray} other
483+
*/
481484
publicAPI.deepCopy = (other) => {
482485
// Retain current dataType and array reference before shallowCopy call.
483486
const currentType = publicAPI.getDataType();
484487
const currentArray = model.values;
485488
publicAPI.shallowCopy(other);
486489

490+
// set the ranges
491+
model.ranges = other.getRanges();
492+
487493
// Avoid array reallocation if size already sufficient
488494
// and dataTypes match.
489495
if (

0 commit comments

Comments
 (0)