Posted 18 June 2024, 10:38 am EST
Hey,
I would like to know how I can watch all the ways to delete the shapes as an event or command appListner because I would perform some actions when a shape is removed.
Forums Home / Spread / SpreadJS
Posted by: ricardo.aleixo on 18 June 2024, 10:38 am EST
Posted 18 June 2024, 10:38 am EST
Hey,
I would like to know how I can watch all the ways to delete the shapes as an event or command appListner because I would perform some actions when a shape is removed.
Posted 19 June 2024, 1:12 am EST
Hi,
As per my understanding, you want to monitor when a shape is removed.
You can achieve this by using the “ShapeRemoved” event, which is triggered whenever a shape is removed. Please refer to the attached snippet and sample for implementation details.
spread.bind(GC.Spread.Sheets.Events.ShapeRemoved, function (e, info) {
console.log("Shape removed:", info);
});
References:
ShapeRemoved: https://developer.mescius.com/spreadjs/api/classes/GC.Spread.Sheets.Events#shaperemoved
Regards,
Priyam