@flowgram.ai/document 0.1.0-alpha.12 → 0.1.0-alpha.13

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
@@ -479,6 +479,11 @@ var _FlowNodeTransformData = class _FlowNodeTransformData extends EntityData2 {
479
479
  y: position.y
480
480
  };
481
481
  }
482
+ set position(position) {
483
+ this.transform.update({
484
+ position
485
+ });
486
+ }
482
487
  set size(size) {
483
488
  const { width, height } = this.data.size;
484
489
  if (this.isContainer) return;
@@ -1979,6 +1984,11 @@ var FlowDocument = class {
1979
1984
  * 导出数据,可以重载
1980
1985
  */
1981
1986
  toJSON() {
1987
+ if (this.disposed) {
1988
+ throw new Error(
1989
+ "The FlowDocument has been disposed and it is no longer possible to call toJSON."
1990
+ );
1991
+ }
1982
1992
  return {
1983
1993
  nodes: this.root.toJSON().blocks
1984
1994
  };