This callback can be used in the setAnnotationPresets() method to do atomic updates to the current annotation presets.
The current annotation presets
The new annotation presets
Use ES2015 arrow functions and the update callback to reduce boilerplate
instance.setAnnotationPresets(presets => { presets.custom = { strokeWidth: 10, }; return presets;}); Copy
instance.setAnnotationPresets(presets => { presets.custom = { strokeWidth: 10, }; return presets;});
This callback can be used in the setAnnotationPresets() method to do atomic updates to the current annotation presets.