26012602if (atomTransform === 'matrix(1, 0, 0, 1, 0, 0)') atomTransform = 'none';2603if (atomTransform === 'none') return;26042605/*2606* matrix(a, b, c, d, e, f)2607*2608* The two arguments, A and D are for scaling the element in the2609* X-direction and the Y-direction, respectively. Identically to that of the scale(a, d) method.2610*2611* matrix(1, 0, 0, 1, 0, 0) === transform: scale(1)2612
* * 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; }); });}function t396__fixElementsLineHeights(elements) { var fastDOM = t396__initFastDOM(); var collectedData = []; fastDOM.read(function () { Array.prototype.forEach.call(elements, function (element) { var elementType = element.getAttribute('data-elem-type'); if (elementType !== 'text') return; var atom = element.querySelector('.tn-atom'); if (!atom) return; if (t396__isInsideGroupWithZoom(element)) return; var zoom = element.style.zoom; var textSizeAdjust = atom.style.webkitTextSizeAdjust; var fontSize = atom.style.fontSize; var lineHeightUnits = element.getAttribute('data-field-lineheightunits-value') || ''; collectedData.push({ element: element, atom: atom, zoom: zoom, textSizeAdjust: textSizeAdjust, fontSize: fontSize, isRelativeLineHeight: lineHeightUnits === '%', }); }); }); fastDOM.write(function () { collectedData.forEach(function (item) { item.atom.style.removeProperty('line-height'); if (window.t396__isSafari && item.zoom) { item.atom.style.webkitTextSizeAdjust = 'none'; item.atom.style.fontSize = ''; item.element.style.zoom = ''; } }); }); fastDOM.read(function () { collectedData.forEach(function (item) { item.computedLineHeight = parseFloat(window.getComputedStyle(item.atom).lineHeight); }); }); fastDOM.write(function () { collectedData.forEach(function (item) { var lineHeight = item.computedLineHeight; if (window.t396__isSafari && item.zoom) { item.atom.style.webkitTextSizeAdjust = item.textSizeAdjust; item.atom.style.fontSize = item.fontSize; if (item.zoom) item.element.style.zoom = item.zoom; } if (lineHeight && !isNaN(lineHeight)) { item.atom.style.setProperty('--lh-px', Math.round(lineHeight) + 'px'); if (!item.isRelativeLineHeight) { item.atom.style.lineHeight = Math.round(lineHeight) + 'px'; } } });