()
| 162 | let oldDevicePixelRatio = 0; |
| 163 | |
| 164 | function onWindowResize() { |
| 165 | const dpr = window.devicePixelRatio; |
| 166 | if (dpr === oldDevicePixelRatio) { |
| 167 | return; |
| 168 | } |
| 169 | oldDevicePixelRatio = dpr; |
| 170 | drpListeningCharts.forEach((resize, chart) => { |
| 171 | if (chart.currentDevicePixelRatio !== dpr) { |
| 172 | resize(); |
| 173 | } |
| 174 | }); |
| 175 | } |
| 176 | |
| 177 | function listenDevicePixelRatioChanges(chart, resize) { |
| 178 | if (!drpListeningCharts.size) { |
nothing calls this directly
no outgoing calls
no test coverage detected