Sfoglia il codice sorgente

fix: include deleted elements when passing to restore (#3802)

vanilla_orig
David Luzar 4 anni fa
parent
commit
55d3287abf
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7
    3
      src/components/App.tsx

+ 7
- 3
src/components/App.tsx Vedi File

655
           const fileHandle = launchParams.files[0];
655
           const fileHandle = launchParams.files[0];
656
           const blob: Blob = await fileHandle.getFile();
656
           const blob: Blob = await fileHandle.getFile();
657
           blob.handle = fileHandle;
657
           blob.handle = fileHandle;
658
-          loadFromBlob(blob, this.state, this.scene.getElements())
658
+          loadFromBlob(
659
+            blob,
660
+            this.state,
661
+            this.scene.getElementsIncludingDeleted(),
662
+          )
659
             .then(({ elements, appState }) =>
663
             .then(({ elements, appState }) =>
660
               this.syncActionResult({
664
               this.syncActionResult({
661
                 elements,
665
                 elements,
3814
         const { elements, appState } = await loadFromBlob(
3818
         const { elements, appState } = await loadFromBlob(
3815
           file,
3819
           file,
3816
           this.state,
3820
           this.state,
3817
-          this.scene.getElements(),
3821
+          this.scene.getElementsIncludingDeleted(),
3818
         );
3822
         );
3819
         this.syncActionResult({
3823
         this.syncActionResult({
3820
           elements,
3824
           elements,
3875
   };
3879
   };
3876
 
3880
 
3877
   loadFileToCanvas = (file: Blob) => {
3881
   loadFileToCanvas = (file: Blob) => {
3878
-    loadFromBlob(file, this.state, this.scene.getElements())
3882
+    loadFromBlob(file, this.state, this.scene.getElementsIncludingDeleted())
3879
       .then(({ elements, appState }) =>
3883
       .then(({ elements, appState }) =>
3880
         this.syncActionResult({
3884
         this.syncActionResult({
3881
           elements,
3885
           elements,

Loading…
Annulla
Salva