Nutrient Web SDK

ReferenceMeasurementValueConfigurationCallback

Type Alias MeasurementValueConfigurationCallback

Nutrient Web SDK allows you to pass a customized configuration for measurements annotation scale and precision through the following callback

Type Alias
Type Signature
type MeasurementValueConfigurationCallback = (
    configuration: MeasurementValueConfiguration[],
) => MeasurementValueConfiguration[]

Example

Configure a custom scale and pass it to our viewer.


const customScales = [
{
scale: {
unitFrom: NutrientViewer.MeasurementScaleUnitFrom.CENTIMETERS,
unitTo: NutrientViewer.MeasurementScaleUnitTo.METERS,
fromValue: 1,
toValue: 2
},
precision: NutrientViewer.MeasurementPrecision.FOUR,
selected: true
}
];

NutrientViewer.load({
// Other options.
measurementValueConfiguration: (documentScales) => {
return [...customScales, ...documentScales];
}
});

See Also

Type Declaration