Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
// ----------------------------------------------------------------------------
const OPTS = {
onUpdate: ['updateOpacity'],
onChange: {
opacity: 'updateOpacity',
},
};
// ----------------------------------------------------------------------------
// Add custom method
// ----------------------------------------------------------------------------
const component = helper.generateComponent('SliceControl', FIELDS, true, OPTS);
Object.assign(component.methods, {
isSliceAvailable,
updateOpacity,
});
export default component;
import helper from 'paraview-glance/src/components/core/Datasets/helper';
const FIELDS = [
{ name: 'tolerance', initialValue: 1 },
{ name: 'atomicRadiusScaleFactor', initialValue: 1 },
{ name: 'bondRadius', initialValue: 1 },
// { name: 'deltaBondFactor', initialValue: 1 },
{ name: 'hideElements', initialValue: '' },
];
export default helper.generateComponent('Molecule', FIELDS, false, {
onChange: {
bondRadius: 'updateData',
atomicRadiusScaleFactor: 'updateData',
// tolerance: 'updateData',
},
});
import helper from 'paraview-glance/src/components/core/Datasets/helper';
const FIELDS = [
{ name: 'pointSize', initialValue: 1 },
{ name: 'opacity', initialValue: 1 },
{ name: 'sampleDistance', initialValue: 1 },
{ name: 'edgeGradient', initialValue: 1 },
{ name: 'representation', initialValue: 'Surface' },
];
export default helper.generateComponent('Representation', FIELDS);