Skip to content
Snippets Groups Projects
Unverified Commit 2fdd7773 authored by Alexander Rose's avatar Alexander Rose Committed by GitHub
Browse files

Merge pull request #499 from molstar/immediate-isolevel

enable immediateUpdate for iso level
parents 31c98ef1 ceeec2c1
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ Note that since we don't clearly distinguish between a public and private interf
- Improve handling principal axes of points in a plane
- Add 'material' annotation support for textures
- More effort to avoid using ``flat`` qualifier in shaders: add ``dVaryingGroup``
- Enable ``immediateUpdate`` for iso level in isosurface and volume streaming controls
## [v3.12.1] - 2022-07-20
......
/**
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2020-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
......@@ -126,12 +126,12 @@ export namespace Volume {
'absolute': PD.Converted(
(v: Volume.IsoValue) => Volume.IsoValue.toAbsolute(v, Grid.One.stats).absoluteValue,
(v: number) => Volume.IsoValue.absolute(v),
PD.Numeric(mean, { min, max, step: toPrecision(sigma / 100, 2) })
PD.Numeric(mean, { min, max, step: toPrecision(sigma / 100, 2) }, { immediateUpdate: true })
),
'relative': PD.Converted(
(v: Volume.IsoValue) => Volume.IsoValue.toRelative(v, Grid.One.stats).relativeValue,
(v: number) => Volume.IsoValue.relative(v),
PD.Numeric(Math.min(1, relMax), { min: relMin, max: relMax, step: toPrecision(Math.round(((max - min) / sigma)) / 100, 2) })
PD.Numeric(Math.min(1, relMax), { min: relMin, max: relMax, step: toPrecision(Math.round(((max - min) / sigma)) / 100, 2) }, { immediateUpdate: true })
)
},
(v: Volume.IsoValue) => v.kind === 'absolute' ? 'absolute' : 'relative',
......
......@@ -104,7 +104,7 @@ class Channel extends PluginUIComponent<{
colorStripe={channel.color}
pivot={<div className='msp-volume-channel-inline-controls'>
<Slider value={value} min={ctrlMin} max={ctrlMax} step={step}
onChange={v => props.changeIso(props.name, v, isRelative)} disabled={props.params.isDisabled} onEnter={props.params.events.onEnter} />
onChange={v => props.changeIso(props.name, v, isRelative)} onChangeImmediate={v => props.changeIso(props.name, v, isRelative)} disabled={props.params.isDisabled} onEnter={props.params.events.onEnter} />
<IconButton svg={this.getVisible() ? VisibilityOutlinedSvg : VisibilityOffOutlinedSvg} onClick={this.toggleVisible} toggleState={false} disabled={props.params.isDisabled} />
</div>}
controls={<ParameterControls onChange={({ name, value }) => props.changeParams(props.name, name, value)} params={ChannelParams} values={channel} onEnter={props.params.events.onEnter} isDisabled={props.params.isDisabled} />}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment