mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Add more events for sharing and refactor I/O, dialogs (#2443)
This commit is contained in:
parent
c43109a230
commit
66e5b18e4e
10 changed files with 87 additions and 75 deletions
|
@ -1,13 +1,13 @@
|
|||
import { EVENT_IO, trackEvent } from "../analytics";
|
||||
import { cleanAppStateForExport } from "../appState";
|
||||
import { restore } from "./restore";
|
||||
import { t } from "../i18n";
|
||||
import { AppState } from "../types";
|
||||
import { LibraryData, ImportedDataState } from "./types";
|
||||
import { calculateScrollCenter } from "../scene";
|
||||
import { MIME_TYPES } from "../constants";
|
||||
import { CanvasError } from "../errors";
|
||||
import { clearElementsForExport } from "../element";
|
||||
import { EVENT_ACTION, trackEvent } from "../analytics";
|
||||
import { CanvasError } from "../errors";
|
||||
import { t } from "../i18n";
|
||||
import { calculateScrollCenter } from "../scene";
|
||||
import { AppState } from "../types";
|
||||
import { restore } from "./restore";
|
||||
import { ImportedDataState, LibraryData } from "./types";
|
||||
|
||||
export const parseFileContents = async (blob: Blob | File) => {
|
||||
let contents: string;
|
||||
|
@ -111,7 +111,7 @@ export const loadFromBlob = async (
|
|||
localAppState,
|
||||
);
|
||||
|
||||
trackEvent(EVENT_ACTION, "load", getMimeType(blob));
|
||||
trackEvent(EVENT_IO, "load", getMimeType(blob));
|
||||
return result;
|
||||
} catch (error) {
|
||||
console.error(error.message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue