()
| 92 | const sizesCache = {}; |
| 93 | |
| 94 | function getSizes() |
| 95 | { |
| 96 | const devicePixelRatio = window.devicePixelRatio; |
| 97 | if(sizesCache[devicePixelRatio]) return sizesCache[devicePixelRatio]; |
| 98 | |
| 99 | return sizesCache[devicePixelRatio] = { |
| 100 | list: [ |
| 101 | 100, |
| 102 | 150, |
| 103 | 200, |
| 104 | 250, |
| 105 | 300, |
| 106 | ], |
| 107 | image: { |
| 108 | 100: Math.round(devicePixelRatio * 100), |
| 109 | 150: Math.round(devicePixelRatio * 150), |
| 110 | 200: Math.round(devicePixelRatio * 200), |
| 111 | 250: Math.round(devicePixelRatio * 250), |
| 112 | 300: Math.round(devicePixelRatio * 300), |
| 113 | }, |
| 114 | poster: { |
| 115 | 100: Math.round(devicePixelRatio * 96), |
| 116 | 150: Math.round(devicePixelRatio * 146), |
| 117 | 200: Math.round(devicePixelRatio * 196), |
| 118 | 250: Math.round(devicePixelRatio * 246), |
| 119 | 300: Math.round(devicePixelRatio * 296), |
| 120 | }, |
| 121 | }; |
| 122 | } |
| 123 | |
| 124 | function getRatios() |
| 125 | { |
no outgoing calls
no test coverage detected