@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.cjs CHANGED
@@ -2136,6 +2136,18 @@ var SpreadsheetController = class {
2136
2136
  this.syncWithDataSource();
2137
2137
  this.recalculateAll();
2138
2138
  }
2139
+ loadDocument(document2) {
2140
+ this.document = JSON.parse(JSON.stringify(document2));
2141
+ this.activeCell = null;
2142
+ this.selectedRange = null;
2143
+ this.editingCell = null;
2144
+ this.draftValue = "";
2145
+ this.undoStack = [];
2146
+ this.redoStack = [];
2147
+ this.syncWithDataSource();
2148
+ this.recalculateAll();
2149
+ this.notifyChange();
2150
+ }
2139
2151
  registerDataSource(ds) {
2140
2152
  this.binder.register(ds);
2141
2153
  this.syncWithDataSource();