hookehuyr

测试新增节点后动态更新ID

......@@ -973,10 +973,11 @@ export default {
*/
function handleAfterAdd(model: myObj, type: string) {
// console.log('handleAfterAdd', model);
// TODO: 因为resize会重新绘制,所以可能需要保存操作
if (type === 'node') {
console.log(`新增节点`)
// TODO: 测试更新ID
model.id = String(new Date().getTime());
editor.updateModel(model);
}
if (type === 'edge') {
console.log(`新增连接线`)
......