You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
2.2 KiB
1 line
2.2 KiB
2 years ago
|
{"ast":null,"code":"import { useEffect, useRef } from 'react';\nexport function useAttribution(map, attribution) {\n const attributionRef = useRef(attribution);\n useEffect(function updateAttribution() {\n if (attribution !== attributionRef.current && map.attributionControl != null) {\n if (attributionRef.current != null) {\n map.attributionControl.removeAttribution(attributionRef.current);\n }\n\n if (attribution != null) {\n map.attributionControl.addAttribution(attribution);\n }\n }\n\n attributionRef.current = attribution;\n }, [map, attribution]);\n}","map":{"version":3,"names":["useEffect","useRef","useAttribution","map","attribution","attributionRef","updateAttribution","current","attributionControl","removeAttribution","addAttribution"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/@react-leaflet/core/lib/attribution.js"],"sourcesContent":["import { useEffect, useRef } from 'react';\nexport function useAttribution(map, attribution) {\n const attributionRef = useRef(attribution);\n useEffect(function updateAttribution() {\n if (attribution !== attributionRef.current && map.attributionControl != null) {\n if (attributionRef.current != null) {\n map.attributionControl.removeAttribution(attributionRef.current);\n }\n if (attribution != null) {\n map.attributionControl.addAttribution(attribution);\n }\n }\n attributionRef.current = attribution;\n }, [\n map,\n attribution\n ]);\n}\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,MAApB,QAAkC,OAAlC;AACA,OAAO,SAASC,cAAT,CAAwBC,GAAxB,EAA6BC,WAA7B,EAA0C;EAC7C,MAAMC,cAAc,GAAGJ,MAAM,CAACG,WAAD,CAA7B;EACAJ,SAAS,CAAC,SAASM,iBAAT,GAA6B;IACnC,IAAIF,WAAW,KAAKC,cAAc,CAACE,OAA/B,IAA0CJ,GAAG,CAACK,kBAAJ,IAA0B,IAAxE,EAA8E;MAC1E,IAAIH,cAAc,CAACE,OAAf,IAA0B,IAA9B,EAAoC;QAChCJ,GAAG,CAACK,kBAAJ,CAAuBC,iBAAvB,CAAyCJ,cAAc,CAACE,OAAxD;MACH;;MACD,IAAIH,WAAW,IAAI,IAAnB,EAAyB;QACrBD,GAAG,CAACK,kBAAJ,CAAuBE,cAAvB,CAAsCN,WAAtC;MACH;IACJ;;IACDC,cAAc,CAACE,OAAf,GAAyBH,WAAzB;EACH,CAVQ,EAUN,CACCD,GADD,EAECC,WAFD,CAVM,CAAT;AAcH"},"metadata":{},"sourceType":"module"}
|