mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
DomHandler hasCSSAnimation and hasCSSTransition added
This commit is contained in:
parent
5455aa896b
commit
c7c71e213f
2 changed files with 24 additions and 0 deletions
|
@ -705,6 +705,28 @@ export default {
|
|||
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
||||
},
|
||||
|
||||
hasCSSAnimation(element) {
|
||||
if (element) {
|
||||
const style = getComputedStyle(element);
|
||||
const animationDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
||||
|
||||
return animationDuration > 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
hasCSSTransition(element) {
|
||||
if (element) {
|
||||
const style = getComputedStyle(element);
|
||||
const transitionDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
||||
|
||||
return transitionDuration > 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
exportCSV(csv, filename) {
|
||||
let blob = new Blob([csv], {
|
||||
type: 'application/csv;charset=utf-8;'
|
||||
|
|
2
components/lib/utils/Utils.d.ts
vendored
2
components/lib/utils/Utils.d.ts
vendored
|
@ -60,6 +60,8 @@ export declare class DomHandler {
|
|||
static isIOS(): boolean;
|
||||
static isAndroid(): boolean;
|
||||
static isTouchDevice(): boolean;
|
||||
static hasCSSAnimation(el: HTMLElement): boolean;
|
||||
static hasCSSTransition(el: HTMLElement): boolean;
|
||||
static exportCSV(csv: any, filename: string): void;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue