-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(frontend): tooltip components
- refactor tooltip components to recieve a view layer and either a raster or vector target. - simplify interaction group config and remove the `tooltipLayers` map.
- Loading branch information
1 parent
8d71116
commit 09bfc38
Showing
13 changed files
with
90 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { FC } from 'react'; | ||
|
||
import { InteractionTarget, VectorTarget } from 'lib/data-map/types'; | ||
import { VectorTarget } from 'lib/data-map/types'; | ||
import { VectorHoverDescription } from 'map/tooltip/content/VectorHoverDescription'; | ||
import { ViewLayer } from 'lib/data-map/view-layers'; | ||
|
||
export const AssetHoverDescription: FC<{ hoveredObject: InteractionTarget<VectorTarget> }> = ({ | ||
hoveredObject, | ||
export const AssetHoverDescription: FC<{ target: VectorTarget; viewLayer: ViewLayer }> = ({ | ||
target, | ||
viewLayer, | ||
}) => { | ||
const { | ||
viewLayer, | ||
target: { feature }, | ||
} = hoveredObject; | ||
|
||
return <VectorHoverDescription viewLayer={viewLayer} feature={feature} />; | ||
return <VectorHoverDescription viewLayer={viewLayer} feature={target.feature} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.