Skip to content

Commit

Permalink
revert 356d957: delete Volume._position in setData()
Browse files Browse the repository at this point in the history
Previous code was setting `_position` to an empty array.
This was causing some bugs where the _position array was not filled
with the proper values and remained empty.
  • Loading branch information
ppillot committed Nov 22, 2023
1 parent cba2f3b commit 25fbf4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/surface/volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Volume {

worker: Worker
workerPool: WorkerPool
_position: Float32Array
_position: Float32Array|undefined
_min: number|undefined
_max: number|undefined
_mean: number|undefined
Expand Down Expand Up @@ -158,7 +158,7 @@ class Volume {
this.data = data || new Float32Array(1)
this.setAtomindex(atomindex)

this._position = new Float32Array()
delete this._position

delete this._min
delete this._max
Expand Down

0 comments on commit 25fbf4a

Please sign in to comment.