@flowgram.ai/document 0.4.19 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -289,13 +289,14 @@ var _FlowNodeRenderData = class _FlowNodeRenderData extends EntityData {
289
289
  stackIndex: 0
290
290
  };
291
291
  }
292
- updateExtInfo(info) {
293
- if (Compare.isChanged(this.data.extInfo, info)) {
294
- const oldInfo = this.data.extInfo;
292
+ updateExtInfo(info, fullUpdate) {
293
+ const oldInfo = this.data.extInfo;
294
+ const newInfo = fullUpdate ? info : { ...oldInfo, ...info };
295
+ if (Compare.isChanged(oldInfo, newInfo)) {
295
296
  this.update({
296
- extInfo: info
297
+ extInfo: newInfo
297
298
  });
298
- this.onExtInfoChangeEmitter.fire({ oldInfo, newInfo: info });
299
+ this.onExtInfoChangeEmitter.fire({ oldInfo, newInfo });
299
300
  }
300
301
  }
301
302
  getExtInfo() {
@@ -1041,8 +1042,8 @@ var FlowNodeEntity = class extends Entity {
1041
1042
  * 修改节点扩展信息
1042
1043
  * @param info
1043
1044
  */
1044
- updateExtInfo(extInfo) {
1045
- this.getData(FlowNodeRenderData).updateExtInfo(extInfo);
1045
+ updateExtInfo(extInfo, fullUpdate) {
1046
+ this.getData(FlowNodeRenderData).updateExtInfo(extInfo, fullUpdate);
1046
1047
  }
1047
1048
  /**
1048
1049
  * 获取节点扩展信息