@pixerate/editor 0.4.0 → 0.4.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/index.js CHANGED
@@ -2055,6 +2055,18 @@ var SpreadsheetController = class {
2055
2055
  this.syncWithDataSource();
2056
2056
  this.recalculateAll();
2057
2057
  }
2058
+ loadDocument(document2) {
2059
+ this.document = JSON.parse(JSON.stringify(document2));
2060
+ this.activeCell = null;
2061
+ this.selectedRange = null;
2062
+ this.editingCell = null;
2063
+ this.draftValue = "";
2064
+ this.undoStack = [];
2065
+ this.redoStack = [];
2066
+ this.syncWithDataSource();
2067
+ this.recalculateAll();
2068
+ this.notifyChange();
2069
+ }
2058
2070
  registerDataSource(ds) {
2059
2071
  this.binder.register(ds);
2060
2072
  this.syncWithDataSource();