From d70ce856d96a585b6e0719eb4e64a197f6660c65 Mon Sep 17 00:00:00 2001 From: Akmal Isomadinov Date: Tue, 16 May 2023 17:45:06 +0500 Subject: [PATCH] Web:Viewer Removed useless code --- .../MediaViewer/helpers/getCustomToolbar.tsx | 56 +++++++++---------- .../sub-components/PDFViewer/index.tsx | 1 - .../PDFViewer/ui/MainPanel/index.tsx | 6 -- 3 files changed, 28 insertions(+), 35 deletions(-) diff --git a/packages/common/components/MediaViewer/helpers/getCustomToolbar.tsx b/packages/common/components/MediaViewer/helpers/getCustomToolbar.tsx index f105a40743..4b90096d12 100644 --- a/packages/common/components/MediaViewer/helpers/getCustomToolbar.tsx +++ b/packages/common/components/MediaViewer/helpers/getCustomToolbar.tsx @@ -149,34 +149,34 @@ export const getPDFToolbar = (): ReturnType => { ), }, - { - key: "context-separator-zoom", - actionType: -1, - noHover: true, - render: ( -
- -
- ), - }, - { - key: "rotateLeft", - actionType: ToolbarActionType.RotateLeft, - render: ( -
- -
- ), - }, - { - key: "rotateRight", - actionType: ToolbarActionType.RotateRight, - render: ( -
- -
- ), - }, + // { + // key: "context-separator-zoom", + // actionType: -1, + // noHover: true, + // render: ( + //
+ // + //
+ // ), + // }, + // { + // key: "rotateLeft", + // actionType: ToolbarActionType.RotateLeft, + // render: ( + //
+ // + //
+ // ), + // }, + // { + // key: "rotateRight", + // actionType: ToolbarActionType.RotateRight, + // render: ( + //
+ // + //
+ // ), + // }, { key: "context-separator-rotate", actionType: -1, diff --git a/packages/common/components/MediaViewer/sub-components/PDFViewer/index.tsx b/packages/common/components/MediaViewer/sub-components/PDFViewer/index.tsx index ea8e07ca30..2b8c3e4dbe 100644 --- a/packages/common/components/MediaViewer/sub-components/PDFViewer/index.tsx +++ b/packages/common/components/MediaViewer/sub-components/PDFViewer/index.tsx @@ -149,7 +149,6 @@ function PDFViewer({ useEffect(() => { if (isLoadedViewerScript && containerRef.current?.hasChildNodes()) { - console.log("resize"); resize(); } }, [isPDFSidebarOpen, isLoadedViewerScript, isOpenMobileDrawer]); diff --git a/packages/common/components/MediaViewer/sub-components/PDFViewer/ui/MainPanel/index.tsx b/packages/common/components/MediaViewer/sub-components/PDFViewer/ui/MainPanel/index.tsx index 603a5968c1..c13201a706 100644 --- a/packages/common/components/MediaViewer/sub-components/PDFViewer/ui/MainPanel/index.tsx +++ b/packages/common/components/MediaViewer/sub-components/PDFViewer/ui/MainPanel/index.tsx @@ -69,12 +69,6 @@ function MainPanel( api.start({ x: 0 }); }, - onPinch: ({ offset: [dScale] }) => { - if (isDesktop) return; - console.log("scale"); - api.set({ scale: dScale }); - setZoom(dScale * 100); - }, }, { drag: {