Skip to main content

onDrawingUpdate

Last updated 12/05/2026

Drawing update handler

This example demonstrates how the

callback receives an updated
DIQ_DrawingRevision
and saves it in the host application. Once completed, the result is returned to the widget through the

onResponse
callback.

TypeScript
Drawing update handler
const onDrawingUpdate = async function(drawing: DIQ_DrawingRevision, onResponse: (result: DIQ_Result) => void) => {
// Example host-side handling
try {
drawingStore.save(drawing);

onResponse({
success: true
} as DIQ_Result);
} catch (error) {
onResponse({
success: false,
error: error instanceof Error ? error.message : "Unknown error"
} as DIQ_Result);
}
};