()
| 41978 | var _utilities1 = require("@uifabric/utilities"); |
| 41979 | var RESIZE_DELAY = 16; |
| 41980 | var getMeasurementCache = function() { |
| 41981 | var measurementsCache = {}; |
| 41982 | return { |
| 41983 | /** |
| 41984 | * Checks if the provided data has a cacheKey. If it has a cacheKey and there is a |
| 41985 | * corresponding entry in the measurementsCache, then it will return that value. |
| 41986 | * Returns undefined otherwise. |
| 41987 | */ getCachedMeasurement: function(data) { |
| 41988 | if (data && data.cacheKey && measurementsCache.hasOwnProperty(data.cacheKey)) return measurementsCache[data.cacheKey]; |
| 41989 | return undefined; |
| 41990 | }, |
| 41991 | /** |
| 41992 | * Should be called whenever there is a new measurement associated with a given data object. |
| 41993 | * If the data has a cacheKey, store that measurement in the measurementsCache. |
| 41994 | */ addMeasurementToCache: function(data, measurement) { |
| 41995 | if (data.cacheKey) measurementsCache[data.cacheKey] = measurement; |
| 41996 | } |
| 41997 | }; |
| 41998 | }; |
| 41999 | var getNextResizeGroupStateProvider = function(measurementCache) { |
| 42000 | if (measurementCache === void 0) measurementCache = getMeasurementCache(); |
| 42001 | var _measurementCache = measurementCache; |
no outgoing calls
no test coverage detected