Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality for the icons of the map control to make it overrideable on the theme #1273

Merged
merged 7 commits into from
Sep 15, 2020

Conversation

nicolasmartinrojo
Copy link
Contributor

No description provided.

@@ -45,7 +45,7 @@ export {
SaveExportDropdownFactory,
PanelHeaderDropdownFactory
} from './side-panel/panel-header';
export {default as PanelHeaderAction} from './side-panel/panel-header-action';
export {default as PanelHeaderActionFactory} from './side-panel/panel-header-action';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need to export PanelHeaderAction

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

MapLegendPanelFactory.deps = [];
export function MapLegendPanelFactory() {
const defaultActionIcons = {
legend() {
Copy link
Contributor

@heshan0131 heshan0131 Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it a key value object

const defaultActionIcons = {
    legend: Legend
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

onToggleMenuPanel();
}}
>
{actionIcons.legend()}
Copy link
Contributor

@heshan0131 heshan0131 Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{<actionIcons.legend height="22px"/>}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, good catch

}
SplitMapButtonFactory.deps = [];
export function SplitMapButtonFactory() {
const defaultActionIcons = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
Toggle3dButtonFactory.deps = [];
export function Toggle3dButtonFactory() {
const defaultActionIcons = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

const defaultActionIcons = {
visible: EyeSeen,
hidden: EyeUnseen,
polygon() {
Copy link
Contributor

@heshan0131 heshan0131 Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each item should have the same construct, why is value of visible a component, and polygon a function?
if you are providing a prop API does it make sense for people to provide icons in different type?

polygon: DrawPolygon

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're correct. fixed

nicolasmartinrojo and others added 6 commits September 15, 2020 13:37
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Nicolas Rojo <nicolas.martin.rojo@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
Signed-off-by: Shan He <heshan0131@gmail.com>
@heshan0131 heshan0131 merged commit a7865c8 into master Sep 15, 2020
@delete-merged-branch delete-merged-branch bot deleted the feature/layerIcons branch September 15, 2020 20:56
geostarters added a commit to geostarters/kepler.gl that referenced this pull request Sep 17, 2020
[Enhancement] Added factory for the icons of the map control (keplergl#1273)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants