diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/Controls.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/Controls.tsx index 07ea97f442b7fa..38e86e4a0d1c93 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/Controls.tsx +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/Controls.tsx @@ -11,7 +11,6 @@ import React, { useContext, useEffect, useState } from 'react'; import styled from 'styled-components'; import { CytoscapeContext } from './Cytoscape'; import { animationOptions, nodeHeight } from './cytoscapeOptions'; -import { FullscreenPanel } from './FullscreenPanel'; const ControlsContainer = styled('div')` left: ${theme.gutterTypes.gutterMedium}; @@ -87,7 +86,6 @@ export function Controls() { const minZoom = cy.minZoom(); const isMinZoom = zoom === minZoom; const increment = (maxZoom - minZoom) / steps; - const mapDomElement = cy.container(); const zoomInLabel = i18n.translate('xpack.apm.serviceMap.zoomIn', { defaultMessage: 'Zoom in' }); @@ -127,7 +125,6 @@ export function Controls() { title={centerLabel} /> - ); } diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/FullscreenPanel.tsx b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/FullscreenPanel.tsx deleted file mode 100644 index 851bf0ebf56fd7..00000000000000 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/FullscreenPanel.tsx +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import { EuiButtonIcon, EuiPanel } from '@elastic/eui'; -import styled from 'styled-components'; -import theme from '@elastic/eui/dist/eui_theme_light.json'; -import { i18n } from '@kbn/i18n'; - -const Button = styled(EuiButtonIcon)` - display: block; - margin: ${theme.paddingSizes.xs}; -`; - -interface FullscreenPanelProps { - element: Element | null; -} - -export function FullscreenPanel({ element }: FullscreenPanelProps) { - const canDoFullscreen = - element && element.ownerDocument && element.ownerDocument.fullscreenEnabled; - - if (!canDoFullscreen) { - return null; - } - - function doFullscreen() { - if (element && element.ownerDocument && canDoFullscreen) { - const isFullscreen = element.ownerDocument.fullscreenElement !== null; - - if (isFullscreen) { - element.ownerDocument.exitFullscreen(); - } else { - element.requestFullscreen(); - } - } - } - - const label = i18n.translate('xpack.apm.serviceMap.fullscreen', { - defaultMessage: 'Full screen' - }); - - return ( - -