本帖最后由 Ellia.Duan 于 2022-10-28 17:38 编辑
您好,可以在ShapeRemved事件或者ShapeRemoving事件中处理delete按键。- sheet.shapes.addConnector('connectorShape', GC.Spread.Sheets.Shapes.ConnectorType.elbow, 200, 50, 300, 100);
- sheet.bind(GC.Spread.Sheets.Events.ShapeRemoved, function (e, info) {
- if(info.shape.name()=='connectorShape'){
- return ;
- }
- console.log(info.shape.name());
- });
复制代码
上面的代码新增了一个线条,并且监听了ShapeRemoved事件,如果判断shape的名称是您这边定义的不想删除的名称,则进行取消tag的系列代码。
|