Некодим© 2020-2026 Некодим
Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.
Журнал изменений История Git Файлы Tilda MCP Каталог файловtilda-tooltip-1.0.js Следить за файлом 701 _repositionInfo: function (element) {702 var elementRect = element.getBoundingClientRect();703 var elementStyle = getComputedStyle(element, null);704 var isScaled = element.closest('.t396__artboard_scale');705 if (isScaled) t_initScaleFactorFlag();706 var originElement = element.closest('.t396__elem, .tn-group');707 var legacyScaleFactor = isScaled ? window.tn_scale_factor : 1;708 var zoomValue = (originElement && originElement.scaleFactor) || legacyScaleFactor;709 var isOnlyScalable = window.isOnlyScalable;710 var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);711 История файла и сравнение версий var topPos = elementRect.top;
712 var leftPos = elementRect.left;713 if (isOnlyScalable || (!isOnlyScalable && isSafari)) {714 topPos += window.pageYOffset;715 leftPos += window.pageXOffset;718 var closestElem = element.closest('.t396__elem');719 var isZoomApplayed = closestElem ? closestElem.style.zoom !== '' : false;720 if (window.shouldUseScaleFactor) {722 leftPos *= zoomValue;725 if (!isOnlyScalable && !isSafari) {726 topPos += window.pageYOffset;727 leftPos += window.pageXOffset;733 !isZoomApplayed && !isOnlyScalable ? element.offsetHeight : element.offsetHeight * zoomValue,734 width: !isZoomApplayed && !isOnlyScalable ? element.offsetWidth : element.offsetWidth * zoomValue,742 !isZoomApplayed && !isOnlyScalable743 ? parseInt(elementStyle.left, 10)744 : parseInt(elementStyle.left, 10) / zoomValue,746 !isZoomApplayed && !isOnlyScalable747 ? parseInt(elementStyle.top, 10)748 : parseInt(elementStyle.top, 10) / zoomValue,753 hide: function (callback) {755 var body = document.body || document.documentElement;757 self.triggerEvent('tildatooltip:hide');758 // save the method custom callback and cancel any show method custom callbacks759 if (callback) self.callbacks.hide.push(callback);760 self.callbacks.show = [];762 // get rid of any appearance timeout763 clearTimeout(self.timerShow);764 self.timerShow = null;765 clearTimeout(self.timerHide);766 self.timerHide = null;769 * Calls custom functions after hiding771 function finishCallbacks() {772 // trigger any hide method custom callbacks and reset them773 for (var i = 0; i < self.callbacks.hide.length; i++) {774 self.callbacks.hide[i].call(self.element);777 self.callbacks.hide = [];781 if (self.Status === 'shown' || self.Status === 'appearing') {782 self.Status = 'disappearing';785 * Changing tooltip state status after hiding, removing element from DOM tree and removing all handlers788 self.Status = 'hidden';790 // detach our content object first, so the next jQuery's remove() call does not unbind its event handlers791 if (typeof self.Content === 'object' && self.Content !== null) {792 if (self.Content && self.Content.parentElement) {793 self.Content = self.Content.parentElement.removeChild(self.Content);797 t_removeEl(self.tooltip);800 // unbind orientationchange, scroll and resize listeners