-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
d484c27
to
37301bd
Compare
@@ -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'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/components/map/map-control.js
Outdated
MapLegendPanelFactory.deps = []; | ||
export function MapLegendPanelFactory() { | ||
const defaultActionIcons = { | ||
legend() { |
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/components/map/map-control.js
Outdated
onToggleMenuPanel(); | ||
}} | ||
> | ||
{actionIcons.legend()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{<actionIcons.legend height="22px"/>}
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/components/map/map-control.js
Outdated
const defaultActionIcons = { | ||
visible: EyeSeen, | ||
hidden: EyeUnseen, | ||
polygon() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're correct. fixed
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>
50c1e6c
to
26124c2
Compare
Signed-off-by: Shan He <heshan0131@gmail.com>
[Enhancement] Added factory for the icons of the map control (keplergl#1273)
No description provided.