I can save and load to apply shadow cast. For duration and threshold options, applying color seems working:
const viewModel = shadowCastWidgetRef.current?.viewModel;
const {discreteOptions,durationOptions,thresholdOptions,visualizationType} = viewModel;
const discreteColor = discreteOptions.color?.toHex();
const durationColor = durationOptions.color?.toHex();
const thresholdColor = thresholdOptions.color?.toHex();
// While loading:
const vm = new ShadowCastViewModel({
view,
discreteOptions: {
color: Color.fromHex(discreteOptions.color), // this does not work
},
durationOptions: {
color: Color.fromHex(durationOptions.color),
},
thresholdOptions: {
color: Color.fromHex(thresholdOptions.color),
},
});
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ShadowCast-ShadowCastView...
Is it a bug or is there another color property for discreteOptions.color? If visualizationType is Threshold or duration, it works. But discrete is not working.