From 5cc04ef2fdc87c32311a72e14fc6938ed32667b3 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Mon, 15 May 2023 14:14:18 +0100 Subject: [PATCH] Remove commented code in App (#1377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR removes some commented code from the events PR. ### Change Type - [x] `internal` — Any other changes that don't affect the published package (will not publish a new version) --- packages/editor/src/lib/app/App.ts | 54 ------------------------------ 1 file changed, 54 deletions(-) diff --git a/packages/editor/src/lib/app/App.ts b/packages/editor/src/lib/app/App.ts index f4afba600..697e429e2 100644 --- a/packages/editor/src/lib/app/App.ts +++ b/packages/editor/src/lib/app/App.ts @@ -8855,60 +8855,6 @@ export class App extends EventEmitter { return this } - - // checkTracking( - // type: 'change' | 'create' | 'delete', - // prev: TLRecord | null, - // next: TLRecord | null - // ) { - // if (type === 'create' && next) { - // if (next && next.typeName === 'page') { - // this.trackEvent('page.add') - // } - // } else if (type === 'delete' && prev) { - // if (prev.typeName === 'page') { - // this.trackEvent('page.remove') - // } - // } else if (prev && next && type === 'change') { - // if (prev.typeName === 'page' && next.typeName === 'page' && prev.name !== next.name) { - // this.trackEvent('page.rename') - // } - // if (prev.typeName === 'instance' && next.typeName === 'instance') { - // // TODO: Not very performant - // for (const key of Object.keys(next.propsForNextShape)) { - // const prevValue = prev.propsForNextShape[key as keyof TLInstancePropsForNextShape] - // const nextValue = next.propsForNextShape[key as keyof TLInstancePropsForNextShape] - // if (prevValue !== nextValue) { - // this.trackEvent(`instance.propsForNextShape.${key}.change`, nextValue) - // } - // } - - // if (prev.isToolLocked !== next.isToolLocked) { - // this.trackEvent('instance.isToolLocked.enabled', next.isToolLocked) - // } - // if (prev.isDebugMode !== next.isDebugMode) { - // this.trackEvent('instance.isDebugMode.enabled', next.isDebugMode) - // } - // if (prev.isFocusMode !== next.isFocusMode) { - // this.trackEvent('instance.isFocusMode.enabled', next.isFocusMode) - // } - // if (prev.currentPageId !== next.currentPageId) { - // this.trackEvent('instance.currentPageId.change') - // } - // } - // if (prev.typeName === 'user_document' && next.typeName === 'user_document') { - // if (prev.isDarkMode !== next.isDarkMode) { - // this.trackEvent('instance.isDarkMode.change', next.isDarkMode) - // } - // if (prev.isGridMode !== next.isGridMode) { - // this.trackEvent('instance.isGridMode.change', next.isGridMode) - // } - // if (prev.isSnapMode !== next.isSnapMode) { - // this.trackEvent('instance.isSnapMode.change', next.isSnapMode) - // } - // } - // } - // } } function alertMaxShapes(app: App, pageId = app.currentPageId) {