Skip to content

Commit

Permalink
[Bug] fix arc layer configurator (#1375)
Browse files Browse the repository at this point in the history
Signed-off-by: Shan He <heshan0131@gmail.com>
  • Loading branch information
heshan0131 committed Dec 10, 2020
1 parent a11c63c commit 823405a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
29 changes: 0 additions & 29 deletions src/components/map/map-popover.js
Expand Up @@ -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 (
<ErrorBoundary>
Expand Down
Expand Up @@ -503,7 +503,7 @@ export default function LayerConfiguratorFactory(
)}
<ConfigGroupCollapsibleContent>
<ChannelByValueSelector
channel={layer.visualChannels.color}
channel={layer.visualChannels.sourceColor}
{...layerChannelConfigProps}
/>
<VisConfigSlider {...layer.visConfigSettings.opacity} {...visConfiguratorProps} />
Expand Down

0 comments on commit 823405a

Please sign in to comment.