Skip to content

Commit d183117

Browse files
agiraultAlexis Girault
authored andcommitted
fix(VolumeRepresentationProxy): do not override initial properties
SampleDistance and EdgeGradient could be defined in a config file, but would then be overridden when `setInputData`.
1 parent 6ce653c commit d183117

File tree

1 file changed

+6
-2
lines changed
  • Sources/Proxy/Representations/VolumeRepresentationProxy

1 file changed

+6
-2
lines changed

Sources/Proxy/Representations/VolumeRepresentationProxy/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,12 @@ function vtkVolumeRepresentationProxy(publicAPI, model) {
204204
model.property.setScalarOpacity(0, pwfProxy.getPiecewiseFunction());
205205

206206
updateConfiguration(inputDataset, publicAPI.getDataArray(), model);
207-
publicAPI.setSampleDistance();
208-
publicAPI.setEdgeGradient();
207+
if (model.sampleDistance < 0 || model.sampleDistance > 1) {
208+
publicAPI.setSampleDistance();
209+
}
210+
if (model.edgeGradient < 0 || model.edgeGradient > 1) {
211+
publicAPI.setEdgeGradient();
212+
}
209213

210214
// Update domains
211215
const state = updateDomains(

0 commit comments

Comments
 (0)