@mapcomponents/react-maplibre 0.1.70 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,14 +4,9 @@ export interface MlComponentTemplateProps {
|
|
|
4
4
|
* Id of the target MapLibre instance in mapContext
|
|
5
5
|
*/
|
|
6
6
|
mapId?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
9
|
-
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
10
|
-
*/
|
|
11
|
-
insertBeforeLayer?: string;
|
|
12
7
|
}
|
|
13
8
|
/**
|
|
14
|
-
* Component
|
|
9
|
+
* Component description
|
|
15
10
|
*
|
|
16
11
|
*/
|
|
17
12
|
declare const MlComponentTemplate: {
|
package/dist/index.esm.js
CHANGED
|
@@ -1241,23 +1241,14 @@ MlCenterPosition.defaultProps = {
|
|
|
1241
1241
|
};
|
|
1242
1242
|
|
|
1243
1243
|
/**
|
|
1244
|
-
* Component
|
|
1244
|
+
* Component description
|
|
1245
1245
|
*
|
|
1246
1246
|
*/
|
|
1247
1247
|
var MlComponentTemplate = function (props) {
|
|
1248
1248
|
var mapHook = useMap({
|
|
1249
1249
|
mapId: props.mapId,
|
|
1250
|
-
waitForLayer: props.insertBeforeLayer,
|
|
1251
1250
|
});
|
|
1252
|
-
|
|
1253
|
-
React.useEffect(function () {
|
|
1254
|
-
if (!mapHook.map || initializedRef.current)
|
|
1255
|
-
return;
|
|
1256
|
-
// the MapLibre-gl instance (mapHook.map) is accessible here
|
|
1257
|
-
// initialize the layer and add it to the MapLibre-gl instance or do something else with it
|
|
1258
|
-
initializedRef.current = true;
|
|
1259
|
-
mapHook.map.map.setCenter([7.132122000552613, 50.716405378037706]);
|
|
1260
|
-
}, [mapHook.map, props.mapId]);
|
|
1251
|
+
console.log(mapHook.componentId + " remove this log");
|
|
1261
1252
|
return React__default["default"].createElement(React__default["default"].Fragment, null);
|
|
1262
1253
|
};
|
|
1263
1254
|
MlComponentTemplate.defaultProps = {
|
|
@@ -6992,9 +6983,10 @@ LayerListItem.defaultProps = {
|
|
|
6992
6983
|
visible: true,
|
|
6993
6984
|
};
|
|
6994
6985
|
|
|
6995
|
-
var
|
|
6996
|
-
var
|
|
6997
|
-
var
|
|
6986
|
+
var ghPagesUrl = 'https://mapcomponents.github.io/react-map-components-maplibre/';
|
|
6987
|
+
var logoUrl = ghPagesUrl + 'assets/WG-MapComponents-Logo_rgb.svg';
|
|
6988
|
+
var logoUrl_dark = ghPagesUrl + 'assets/WG-MapComponents-Logo_rgb-weisse-schrift.svg';
|
|
6989
|
+
var logoUrl_mobile = ghPagesUrl + 'assets/mapcomponents_logo.png';
|
|
6998
6990
|
function TopToolbar(props) {
|
|
6999
6991
|
var theme = styles.useTheme();
|
|
7000
6992
|
var _a = React.useState(null), anchorElNav = _a[0], setAnchorElNav = _a[1];
|
|
@@ -7070,7 +7062,12 @@ function Sidebar(_a) {
|
|
|
7070
7062
|
var _b = React.useState(false), drawerOpen = _b[0], setDrawerOpen = _b[1];
|
|
7071
7063
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
7072
7064
|
!mediaIsMobile ? (React__default["default"].createElement(Box__default["default"], { sx: { display: { xs: 'none', sm: 'flex' }, mr: 1 } },
|
|
7073
|
-
React__default["default"].createElement(material.Drawer, __assign({ transitionDuration: 0, variant: "persistent", anchor: "left", open: typeof props.open === 'undefined' ? drawerOpen : props.open, PaperProps: __assign(__assign({}, drawerPaperProps), { sx: __assign({ maxWidth: { lg: '30%', md: '40%', sm: '50%', xs: '78%' }, padding: { lg: '20px', md: '20px', sm: '20px', xs: '10px' }
|
|
7065
|
+
React__default["default"].createElement(material.Drawer, __assign({ transitionDuration: 0, variant: "persistent", anchor: "left", open: typeof props.open === 'undefined' ? drawerOpen : props.open, PaperProps: __assign(__assign({}, drawerPaperProps), { sx: __assign({ maxWidth: { lg: '30%', md: '40%', sm: '50%', xs: '78%' }, padding: { lg: '20px', md: '20px', sm: '20px', xs: '10px' }, top: '64px', width: {
|
|
7066
|
+
xs: '80%',
|
|
7067
|
+
sm: '60%',
|
|
7068
|
+
md: '350px',
|
|
7069
|
+
lg: '350px',
|
|
7070
|
+
}, boxSizing: 'border-box' }, drawerPaperProps === null || drawerPaperProps === void 0 ? void 0 : drawerPaperProps.sx) }), sx: __assign({ flexGrow: 1, zIndex: 105, position: 'absolute', bottom: 0, display: 'flex', flexDirection: 'column', maxWidth: { lg: '30%', md: '40%', sm: '50%', xs: '78%' } }, (drawerOpen ? {} : { left: mediaIsMobile ? '-90vw' : '-20vw' })) }, props),
|
|
7074
7071
|
React__default["default"].createElement(DrawerHeader, __assign({}, drawerHeaderProps),
|
|
7075
7072
|
React__default["default"].createElement(_.Typography, { variant: "h6" }, props.name),
|
|
7076
7073
|
React__default["default"].createElement(material.IconButton, { onClick: props.setOpen
|