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 lines
4.0 KiB
1 lines
4.0 KiB
{"ast":null,"code":"import { createElementObject, createLayerComponent, extendContext } from '@react-leaflet/core';\nimport { Marker as LeafletMarker } from 'leaflet';\nexport const Marker = createLayerComponent(function createMarker(_ref, ctx) {\n let {\n position,\n ...options\n } = _ref;\n const marker = new LeafletMarker(position, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, function updateMarker(marker, props, prevProps) {\n if (props.position !== prevProps.position) {\n marker.setLatLng(props.position);\n }\n\n if (props.icon != null && props.icon !== prevProps.icon) {\n marker.setIcon(props.icon);\n }\n\n if (props.zIndexOffset != null && props.zIndexOffset !== prevProps.zIndexOffset) {\n marker.setZIndexOffset(props.zIndexOffset);\n }\n\n if (props.opacity != null && props.opacity !== prevProps.opacity) {\n marker.setOpacity(props.opacity);\n }\n\n if (marker.dragging != null && props.draggable !== prevProps.draggable) {\n if (props.draggable === true) {\n marker.dragging.enable();\n } else {\n marker.dragging.disable();\n }\n }\n});","map":{"version":3,"names":["createElementObject","createLayerComponent","extendContext","Marker","LeafletMarker","createMarker","ctx","position","options","marker","overlayContainer","updateMarker","props","prevProps","setLatLng","icon","setIcon","zIndexOffset","setZIndexOffset","opacity","setOpacity","dragging","draggable","enable","disable"],"sources":["/Users/mahdi/Documents/work/programming/barnameNegar/arbaeenWebApp/node_modules/react-leaflet/lib/Marker.js"],"sourcesContent":["import { createElementObject, createLayerComponent, extendContext } from '@react-leaflet/core';\nimport { Marker as LeafletMarker } from 'leaflet';\nexport const Marker = createLayerComponent(function createMarker({ position , ...options }, ctx) {\n const marker = new LeafletMarker(position, options);\n return createElementObject(marker, extendContext(ctx, {\n overlayContainer: marker\n }));\n}, function updateMarker(marker, props, prevProps) {\n if (props.position !== prevProps.position) {\n marker.setLatLng(props.position);\n }\n if (props.icon != null && props.icon !== prevProps.icon) {\n marker.setIcon(props.icon);\n }\n if (props.zIndexOffset != null && props.zIndexOffset !== prevProps.zIndexOffset) {\n marker.setZIndexOffset(props.zIndexOffset);\n }\n if (props.opacity != null && props.opacity !== prevProps.opacity) {\n marker.setOpacity(props.opacity);\n }\n if (marker.dragging != null && props.draggable !== prevProps.draggable) {\n if (props.draggable === true) {\n marker.dragging.enable();\n } else {\n marker.dragging.disable();\n }\n }\n});\n"],"mappings":"AAAA,SAASA,mBAAT,EAA8BC,oBAA9B,EAAoDC,aAApD,QAAyE,qBAAzE;AACA,SAASC,MAAM,IAAIC,aAAnB,QAAwC,SAAxC;AACA,OAAO,MAAMD,MAAM,GAAGF,oBAAoB,CAAC,SAASI,YAAT,OAAiDC,GAAjD,EAAsD;EAAA,IAAhC;IAAEC,QAAF;IAAa,GAAGC;EAAhB,CAAgC;EAC7F,MAAMC,MAAM,GAAG,IAAIL,aAAJ,CAAkBG,QAAlB,EAA4BC,OAA5B,CAAf;EACA,OAAOR,mBAAmB,CAACS,MAAD,EAASP,aAAa,CAACI,GAAD,EAAM;IAClDI,gBAAgB,EAAED;EADgC,CAAN,CAAtB,CAA1B;AAGH,CALyC,EAKvC,SAASE,YAAT,CAAsBF,MAAtB,EAA8BG,KAA9B,EAAqCC,SAArC,EAAgD;EAC/C,IAAID,KAAK,CAACL,QAAN,KAAmBM,SAAS,CAACN,QAAjC,EAA2C;IACvCE,MAAM,CAACK,SAAP,CAAiBF,KAAK,CAACL,QAAvB;EACH;;EACD,IAAIK,KAAK,CAACG,IAAN,IAAc,IAAd,IAAsBH,KAAK,CAACG,IAAN,KAAeF,SAAS,CAACE,IAAnD,EAAyD;IACrDN,MAAM,CAACO,OAAP,CAAeJ,KAAK,CAACG,IAArB;EACH;;EACD,IAAIH,KAAK,CAACK,YAAN,IAAsB,IAAtB,IAA8BL,KAAK,CAACK,YAAN,KAAuBJ,SAAS,CAACI,YAAnE,EAAiF;IAC7ER,MAAM,CAACS,eAAP,CAAuBN,KAAK,CAACK,YAA7B;EACH;;EACD,IAAIL,KAAK,CA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