Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/ui/panel/ |
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/ui/panel/card_action.min.js |
(function(){"use strict";BX.namespace("BX.Landing.UI.Panel");BX.Landing.UI.Panel.CardAction=function(t,n){BX.Landing.UI.Panel.BaseButtonPanel.apply(this,arguments);o(this)};function t(t){return t.getBoundingClientRect()}function n(t){return t.height<100}function a(t,n){return t.width<n.width}function i(t,n){return{width:Math.abs(t.width-n.width),height:Math.abs(t.height-n.height),top:Math.abs(t.top-n.top),right:Math.abs(t.right-n.right),bottom:Math.abs(t.bottom-n.bottom),left:Math.abs(t.left-n.left)}}function o(o){BX.DOM.read(function(){if(o.layout&&o.layout.parentNode){var e=t(o.layout.parentNode);var r="landing-ui-size-lg";if(n(e)){r="landing-ui-size-xs"}BX.DOM.write(function(){o.layout.classList.add(r);BX.DOM.read(function(){var n=t(o.layout);var r="auto";if(a(e,n)){r=-(i(e,n).width/2)}BX.DOM.write(function(){o.layout.style.left=r+"px"})})})}})}BX.Landing.UI.Panel.CardAction.prototype={constructor:BX.Landing.UI.Panel.CardAction,__proto__:BX.Landing.UI.Panel.BaseButtonPanel.prototype}})();