From 823405ab08106312865a79b67e7ef6eeb1545af4 Mon Sep 17 00:00:00 2001 From: Shan He Date: Thu, 10 Dec 2020 10:32:59 -0800 Subject: [PATCH] [Bug] fix arc layer configurator (#1375) Signed-off-by: Shan He --- src/components/map/map-popover.js | 29 ------------------- .../layer-panel/layer-configurator.js | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/src/components/map/map-popover.js b/src/components/map/map-popover.js index ee4f770ce4..0e33f098c0 100644 --- a/src/components/map/map-popover.js +++ b/src/components/map/map-popover.js @@ -199,35 +199,6 @@ export default function MapPopoverFactory(LayerHoverInfo, CoordinateInfo) { {layerHoverProp, x, y, mapW, mapH}, popover ); - // const [isLeft, setIsLeft] = useState(false); - // const [pos, setPosition] = useState({}); - - // const moveLeft = useCallback(() => setIsLeft(true), [setIsLeft]); - // const moveRight = useCallback(() => setIsLeft(false), [setIsLeft]); - // const hoverData = layerHoverProp && layerHoverProp.data; - - // useLayoutEffect(() => { - // const node = popover.current; - // if (!node || !hoverData) { - // return; - // } - // const width = Math.round(node.offsetWidth); - // const height = Math.round(node.offsetHeight); - - // if (Number.isFinite(width) && width > 0 && Number.isFinite(height) && height > 0) { - // setPosition( - // getPosition({ - // x, - // y, - // mapW, - // mapH, - // width, - // height, - // isLeft - // }) - // ); - // } - // }, [x, y, mapH, mapW, isLeft, hoverData]); return ( diff --git a/src/components/side-panel/layer-panel/layer-configurator.js b/src/components/side-panel/layer-panel/layer-configurator.js index aafde97c88..75686d7f39 100644 --- a/src/components/side-panel/layer-panel/layer-configurator.js +++ b/src/components/side-panel/layer-panel/layer-configurator.js @@ -503,7 +503,7 @@ export default function LayerConfiguratorFactory( )}