mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 19:41:33 +02:00
[web] remove jump-to-location event (#27490)
* [web] remove jump-to-location event * [web] remove unused imports GitOrigin-RevId: 2be9405b6c2d3d589184c7c913294b2cbe828250
This commit is contained in:
@@ -9,7 +9,6 @@ import withErrorBoundary from '../../../infrastructure/error-boundary'
|
||||
import PdfPreviewErrorBoundaryFallback from './pdf-preview-error-boundary-fallback'
|
||||
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
||||
import { captureException } from '../../../infrastructure/error-reporter'
|
||||
import * as eventTracking from '../../../infrastructure/event-tracking'
|
||||
import { getPdfCachingMetrics } from '../util/metrics'
|
||||
import { debugConsole } from '@/utils/debugging'
|
||||
import { usePdfPreviewContext } from '@/features/pdf-preview/components/pdf-preview-provider'
|
||||
@@ -261,11 +260,6 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
|
||||
)
|
||||
|
||||
if (clickPosition) {
|
||||
eventTracking.sendMB('jump-to-location', {
|
||||
direction: 'pdf-location-in-code',
|
||||
method: 'double-click',
|
||||
})
|
||||
|
||||
window.dispatchEvent(
|
||||
new CustomEvent('synctex:sync-to-position', {
|
||||
detail: {
|
||||
|
||||
@@ -3,7 +3,6 @@ import { memo, useCallback, useMemo } from 'react'
|
||||
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
||||
import { useLayoutContext } from '../../../shared/context/layout-context'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import * as eventTracking from '../../../infrastructure/event-tracking'
|
||||
import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
|
||||
import OLButton from '@/features/ui/components/ol/ol-button'
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
@@ -38,10 +37,6 @@ const GoToCodeButton = memo(function GoToCodeButton({
|
||||
}
|
||||
|
||||
const syncToCodeWithButton = useCallback(() => {
|
||||
eventTracking.sendMB('jump-to-location', {
|
||||
direction: 'pdf-location-in-code',
|
||||
method: 'arrow',
|
||||
})
|
||||
syncToCode({ visualOffset: 72 })
|
||||
}, [syncToCode])
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import useDetachAction from '../../../shared/hooks/use-detach-action'
|
||||
import localStorage from '../../../infrastructure/local-storage'
|
||||
import { useFileTreeData } from '../../../shared/context/file-tree-data-context'
|
||||
import useScopeEventListener from '../../../shared/hooks/use-scope-event-listener'
|
||||
import * as eventTracking from '../../../infrastructure/event-tracking'
|
||||
import { debugConsole } from '@/utils/debugging'
|
||||
import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
|
||||
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
||||
@@ -163,11 +162,6 @@ export default function useSynctex(): {
|
||||
column: String(column),
|
||||
}).toString()
|
||||
|
||||
eventTracking.sendMB('jump-to-location', {
|
||||
direction: 'code-location-in-pdf',
|
||||
method: 'arrow',
|
||||
})
|
||||
|
||||
goToPdfLocation(params)
|
||||
}
|
||||
}, [getCurrentFilePath, goToPdfLocation])
|
||||
|
||||
Reference in New Issue
Block a user