How to use the paraview-glance/src/components/core/Datasets/helper.generateComponent function in paraview-glance

To help you get started, we’ve selected a few paraview-glance examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Kitware / paraview-glance / src / components / controls / SliceControl / script.js View on Github external
}

// ----------------------------------------------------------------------------

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;
github Kitware / paraview-glance / src / components / controls / Molecule / script.js View on Github external
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',
  },
});
github Kitware / paraview-glance / src / components / controls / Representation / script.js View on Github external
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);