CalculationFinished Event
What is the CalculationFinished event?
When is this event triggered?
How do I listen for this event?
window.addEventListener('CalculationFinished', (event) => {
const result = event.detail;
console.log('Calculation completed:', result);
// Your custom logic here
handleCalculationResult(result);
});What data does the event contain?
[
{
"unit": {
"svg": "<svg image>",
"svgM": null,
"zero": {
"left": 457.015,
"bottom": 563.5
},
"imageSize": {
"width": 891,
"height": 891
},
"name": "5m x 5m",
"id": "<unit-id>",
"unitDetails": {
"id": "<unit-id>",
"name": "5m x 5m",
"unit": {
"ID": "unit-id",
"unitName": "5m x 5m",
"unitWidth": "5",
"unitHeight": "2.4",
"unitDepth": "5"
},
"dimensions": {
"width": 500,
"depth": 500,
"height": 240
}
}
},
"items": [
{
"id": "bbq",
"x": -88.248457,
"y": -80.79013988439307,
"orientation": "turned",
"scale": false,
"width": 49.5,
"volume": 0.50642262,
"quantity": 1,
"image": null
}
],
"totalItemsWeight": 908.4,
"totalVolume": 15.765080274,
"animationDone": true
}
]Best Practices
Browser Compatibility
Last updated
Was this helpful?