var isAllArtboardsRendered = artBoards.length > 0 && artBoards.every(function (artboard) { return artboard.classList.contains('rendered'); }); if (isAllArtboardsRendered) { callback(); } else { var renderedList = artBoards.filter(function (artboard) { return artboard.classList.contains('rendered'); }); artBoards.forEach(function (artboard) { if (artboard.classList.contains('rendered')) return; artboard.addEventListener('artBoardRendered', function () { renderedList.push(artboard); if (renderedList.length === artBoards.length && !isFallbackTimerInit) callback(); }); }); setTimeout(function () { isFallbackTimerInit = true; if (renderedList.length === artBoards.length) return; callback(); }, 3000); }}function t396__processElementsTransform(elements) { var fastDOM = t396__initFastDOM(); var collectedData = []; fastDOM.read(function () { Array.prototype.forEach.call(elements, function (element) { var elemType = element.getAttribute('data-elem-type'); if ( elemType !== 'text' && elemType !== 'image' && elemType !== 'shape' && elemType !== 'button' && elemType !== 'vector' ) return; var elementStyles = getComputedStyle(element); var elementHasBlur = (elementStyles.backdropFilter && elementStyles.backdropFilter !== 'none') || (elementStyles.webkitBackdropFilter && elementStyles.webkitBackdropFilter !== 'none'); var elementHasAnimation = element.getAttribute('data-animate-style'); if (!elementHasBlur || elementHasAnimation) return; var atom = element.querySelector('.tn-atom'); var atomTransform = atom ? window.getComputedStyle(atom).transform : 'none'; if (atomTransform === 'matrix(1, 0, 0, 1, 0, 0)') atomTransform = 'none'; if (atomTransform === 'none') return; /* * matrix(a, b, c, d, e, f) * * The two arguments, A and D are for scaling the element in the * X-direction and the Y-direction, respectively. Identically to that of the scale(a, d) method. * * matrix(1, 0, 0, 1, 0, 0) === transform: scale(1) * * The second and third arguments B and C are for skewing the element. * The two values work identically to that of the skew(b, c) method. * * matrix(0.707107, 0.707107, -0.707107, 0.707107, 0, 0) === rotate(45deg) * if there is any rotation than B === -C && A === D */ collectedData.push({ element: element, atom: atom, atomTransform: atomTransform, }); }); }); fastDOM.write(function () { collectedData.forEach(function (item) { item.atom.style.transform = 'none'; item.element.style.transform = item.atomTransform; }); });}