File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed
MapPane/components/MainMap Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ class MapLibreMap
4343 [ - 73.70027209999999 , 40.9175771 ] , // NE
4444 ] ,
4545 hash : true ,
46+ attributionControl : {
47+ compact : false ,
48+ } ,
4649 } ) ;
4750 this . map = map ;
4851
49- map . addControl ( new maplibregl . AttributionControl ( ) ) ;
50-
5152 map . on ( 'click' , PHOTO_LAYER , ( e ) => {
5253 const { panOnClick } = this . props ;
5354 if ( panOnClick ) map . panTo ( e . lngLat ) ;
Original file line number Diff line number Diff line change @@ -13,14 +13,16 @@ export default function ToteBag(): JSX.Element {
1313 if ( ! container ) return ;
1414
1515 const attributionEl = container . querySelector (
16- '.mapboxgl-ctrl-attrib-inner'
16+ '.mapboxgl-ctrl-attrib-inner,.maplibregl-ctrl-attrib-inner '
1717 ) ;
1818 if ( ! attributionEl ) return ;
1919
2020 const observer = new MutationObserver ( ( ) => {
2121 const text = ( attributionEl as HTMLElement ) . innerText ;
2222 const improveText =
23- attributionEl . querySelector ( '.mapbox-improve-map' ) ?. textContent || '' ;
23+ attributionEl . querySelector (
24+ '.mapbox-improve-map,.maplibregl-improve-map'
25+ ) ?. textContent || '' ;
2426
2527 if ( text ) {
2628 setAttributionText ( text . replace ( improveText , '' ) ) ;
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ module.exports = {
4545 } ,
4646 {
4747 test : / \. ( c s s | l e s s ) $ / ,
48+ exclude : / n o d e _ m o d u l e s / ,
4849 use : [
4950 MiniCssExtractPlugin . loader ,
5051 {
@@ -60,6 +61,21 @@ module.exports = {
6061 'less-loader' ,
6162 ] ,
6263 } ,
64+ {
65+ test : / \. c s s $ / ,
66+ include : / n o d e _ m o d u l e s / ,
67+ use : [
68+ MiniCssExtractPlugin . loader ,
69+ {
70+ loader : 'css-loader' ,
71+ options : {
72+ modules : false ,
73+ importLoaders : 1 ,
74+ } ,
75+ } ,
76+ 'postcss-loader' ,
77+ ] ,
78+ } ,
6379 {
6480 test : / \. ( p n g | j p g | g i f | s v g | s t y l e \. j s o n ) $ / ,
6581 type : 'asset/resource' ,
You can’t perform that action at this time.
0 commit comments