{"version":3,"file":"main.bundle.js","mappings":"mBAIA,IAAMA,EAAkB,WACNC,SAASC,iBAAiB,qBAClCC,SAAQ,SAAAC,GACVC,QAAQC,IAAIF,EAAKG,cAAcA,cAAcC,aACzCJ,EAAKG,cAAcA,cAAcC,YAAc,GAC/CC,OAAOC,SAASN,EAAM,CAClBO,MAAOP,EAAKG,cAAcA,cAAcC,aAGpD,GACJ,ECbAP,SAASW,iBAAiB,oBAAoB,WDiB1CZ,IACAa,OAAOD,iBAAiB,SAAUZ,EChBtC,GAAG,CAAEc,MAAM,G","sources":["webpack://blogpost/./src/plotting.js","webpack://blogpost/./src/index.js"],"sourcesContent":["\n\n// Get all plots on the page\n// \nconst updatePlotSizes = () => {\n const plots = document.querySelectorAll('.plotly-graph-div');\n plots.forEach(plot => {\n console.log(plot.parentElement.parentElement.offsetWidth);\n if (plot.parentElement.parentElement.offsetWidth > 0) {\n Plotly.relayout(plot, {\n width: plot.parentElement.parentElement.offsetWidth,\n });\n }\n });\n}\n\n// Function to update plot sizes\nexport function initResizing() {\n updatePlotSizes();\n window.addEventListener('resize', updatePlotSizes);\n}\n\n// Add event listener for window resize\n","import { initResizing } from \"./plotting\";\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n initResizing();\n}, { once: true });"],"names":["updatePlotSizes","document","querySelectorAll","forEach","plot","console","log","parentElement","offsetWidth","Plotly","relayout","width","addEventListener","window","once"],"sourceRoot":""}