Angular Common - Utils - utils
An object that serves as a namespace for utility methods that can be helpful when working with DevExtreme components.
cancelAnimationFrame(requestID)
Cancels an animation frame request scheduled with the requestAnimationFrame method.
This method acts as a normalization of the standard cancelAnimationFrame method of the window object.
window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame
If the API in the code above is not supported, the DevExpress.utils.cancelAnimationFrame(requestID) method clears a timer set with the requestAnimationFrame method.
getTimeZones(date)
Gets the list of IANA time zone objects.
This method can accept a specific date to get the list of time zone objects for that date. This is useful because these objects can be removed or added, and time zone offsets can change, for example, due to daylight savings.
The following code illustrates how to use this method:
const timeZones = DevExpress.utils.getTimeZones(new Date(2020, 6, 21)); // ===== or when using modules ===== import { getTimeZones } from 'devextreme/time_zone_utils'; const timeZones = getTimeZones(new Date(2020, 6, 21)); // The timeZones constant contains the following array: // [ // { offset: 2, title: "(GMT +02:00) Europe/Berlin", id: "Europe/Berlin" }, // { offset: 2, title: "(GMT +02:00) Europe/Amsterdam", id: "Europe/Amsterdam" } // ... // ]
initMobileViewport(options)
requestAnimationFrame(callback)
This method acts as a normalization of the standard requestAnimationFrame method of the window object:
window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame
If the API in the code above is not supported, the DevExpress.utils.requestAnimationFrame(callback) method calls the function passed as a parameter after an internally set timeout.
If you have technical questions, please create a support ticket in the DevExpress Support Center.