@material-ui/icons APIs
- Close
- ExpandMore
- Add
- ExpandLess
- ArrowDropDown
- GitHub
- Check
- ArrowUpward
- ArrowDownward
- MoreVert
- Launch
- Info
- ChevronRight
- Edit
- Clear
- HelpOutline
- Delete
- Search
- Visibility
- VisibilityOff
- Settings
- ExitToApp
- Error
- InfoOutlined
- ArrowDropUp
- Brightness3
- CheckCircle
- KeyboardArrowRight
- KeyboardArrowDown
- KeyboardArrowUp
- Schedule
- ImageRounded
- Refresh
- KeyboardArrowLeft
- ArrowForward
- WarningRounded
- CloudDownload
- FullscreenExit
- Notifications
- ChevronLeft
- VolumeUp
- ArrowBack
- Work
- Person
- Favorite
- SearchOutlined
- AccountCircle
- Send
- Warning
- FirstPage
- LastPage
- Brightness5
- Telegram
- AccountBalanceWallet
- NotificationsNone
- AddCircle
- SwapHoriz
- AccessTime
- DoneOutlined
- ChevronRightRounded
- List
- ViewModule
- ThumbDownOutlined
- ThumbUpOutlined
- Forum
- CallMade
- PlayCircleOutline
- Cancel
- CancelRounded
- ArrowForwardIos
- LiveHelp
- AllInbox
- Face
- People
- SettingsPower
- NavigateNext
- NavigateBefore
- Save
- LayersClear
- Collections
- ThumbDown
- ThumbUp
- ZoomIn
- ZoomOut
- Fullscreen
- BarChart
- Image
- CenterFocusWeak
- VolumeDown
- Copyright
- DirectionsBoatRounded
- Create
- DeleteOutline
- DeleteOutlineOutlined
- CloudUploadOutlined
- PlayArrow
- Stop
- Done
- Undo
- FileCopy
- Menu
- Home
- Accessibility
- NotificationsActive
- Today
- Gavel
- AddAPhoto
- Dashboard
- Devices
- Event
- FitnessCenter
- Remove
- PinDrop
- Toc
- Group
- MenuBook
- NotListedLocation
- LocationOff
- Alarm
- BrightnessMedium
- Cloud
- ListAlt
- Pets
- GetApp
- ControlPoint
- FiberManualRecordRounded
- Flag
- FileCopyOutlined
- ExitToAppOutlined
- OpenInNew
- CheckCircleOutlined
- CancelOutlined
- PauseCircleOutline
- RemoveCircleOutline
- PlayCircleOutlineOutlined
- ArrowDownwardOutlined
- Brightness7
- OpenInNewSharp
- FilterCenterFocusSharp
- Web
- CheckRounded
- DeleteRounded
- FileCopyRounded
- MoreVertRounded
- SendRounded
- Cached
- CalendarToday
- FlashOn
- PictureAsPdf
- GridOn
- ArrowBackRounded
- PersonAddRounded
- KeyboardArrowUpRounded
- KeyboardArrowDownRounded
- KeyboardArrowLeftRounded
- KeyboardArrowRightRounded
- IndeterminateCheckBoxRounded
- FilterList
- Subject
- ExitToAppRounded
- CachedRounded
- FaceRounded
- Language
- SvgIconComponent
- MoreHoriz
- YouTube
- RestorePage
- NoteAdd
- ArrowBackIos
- Equalizer
- ImportExportRounded
- CloudDownloadRounded
- HelpOutlineRounded
- Star
- Business
- HouseOutlined
- ArrowRight
- ErrorOutline
- Lock
- FavoriteBorder
- MeetingRoom
- Mic
- MicOff
- Videocam
- VideocamOff
- VolumeOff
- ScreenShare
- Receipt
- Title
- ViewComfy
- ViewCompact
- FiberManualRecord
- RadioButtonUnchecked
Other Related APIs
- react#useState
- react#useEffect
- react#ReactNode
- react#forwardRef
- lodash#last
- lodash#sortBy
- @material-ui/core#Typography
- @material-ui/core#TextField
- @material-ui/core#CircularProgress
- @material-ui/core#Theme
- @material-ui/core#FormControl
- @material-ui/core#useMediaQuery
- @material-ui/core#MenuItem
- @material-ui/core#InputAdornment
- @material-ui/core#makeStyles
- @material-ui/core#ListSubheader
- @material-ui/core#withStyles
- @material-ui/core#TextFieldProps
- @material-ui/core#Select
- @material-ui/core#InputLabel
- @material-ui/core#styled
@material-ui/icons#CenterFocusWeak TypeScript Examples
The following examples show how to use
@material-ui/icons#CenterFocusWeak.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BoundaryDropdown.tsx From prism-frontend with MIT License | 5 votes |
GotoBoundaryDropdown = () => {
const map = useSelector(mapSelector);
const [boundaries, setBoundaries] = useState<string[]>([]);
const boundaryLayerData = useSelector(layerDataSelector(boundaryLayer.id)) as
| LayerData<BoundaryLayerProps>
| undefined;
const { data } = boundaryLayerData || {};
const {
map: { latitude, longitude, zoom },
} = appConfig;
const { t } = useSafeTranslation();
const styles = useStyles();
if (!data || !map || !enableNavigationDropdown) {
return null;
}
return (
<div className={styles.dropdownMenu}>
<CenterFocusWeak fontSize="small" className={styles.icon} />
<ButtonStyleBoundaryDropdown
selectedBoundaries={boundaries}
selectAll={false}
labelMessage={t('Go To')}
className={styles.formControl}
setSelectedBoundaries={(newSelectedBoundaries, appendMany) => {
setBoundaries(() => {
if (appendMany === true) {
return newSelectedBoundaries;
}
return newSelectedBoundaries.slice(-1);
});
if (newSelectedBoundaries.length === 0) {
map.flyTo({ center: { lng: longitude, lat: latitude }, zoom });
return;
}
const geometries = data.features
.filter(f =>
newSelectedBoundaries.includes(
f.properties && f.properties[boundaryLayer.adminCode],
),
)
.filter(f => f.geometry.type === 'MultiPolygon')
.map(f => f.geometry as MultiPolygon);
const bboxes = geometries.map(geom => {
const turfObj = multiPolygon(geom.coordinates);
const geomBbox = bbox(turfObj);
return geomBbox;
});
const bboxPolygons = bboxes.map(box => bboxPolygon(box));
const unionBbox = bboxPolygons.reduce((unionPolygon, polygon) => {
const unionObj = union(unionPolygon, polygon);
if (!unionObj) {
return unionPolygon;
}
return unionObj as Feature<Polygon>;
}, bboxPolygons[0]);
map.fitBounds(bbox(unionBbox) as Extent, {
padding: 30,
});
}}
/>
</div>
);
}