if (fixedLeftTS.css('position') === 'fixed') {
var anchorHeight = anchor.outerHeight() - 1;
fixedLeftTS.css('top', anchorHeight);
var leftBoundingTS = fixedLeftTS[0].getBoundingClientRect();
iterateLeftpads(function (containerTS) {
var containerBoundingTS = containerTS.getBoundingClientRect();
if (containerBoundingTS.left <= leftBoundingTS.right) {
$(containerTS).css('padding-left', leftBoundingTS.width + 16);
} else {
$(containerTS).css('padding-left', '');
}
});
} else {
fixedLeftTS.css('top', '');
iterateLeftpads(function (containerTS) {
$(containerTS).css('padding-left', '');
});
}
})();
// Fixed right script
(function () {
if (!fixedRightTS || fixedRightTS.length === 0) return;
if (editing) {
fixedRightTS[0].classList.add(forceUnfixClassTS);
} else {
fixedRightTS[0].classList.remove(forceUnfixClassTS);
}
if (fixedRightTS.css('position') === 'fixed') {
var anchorHeight = anchor.outerHeight() - 1;
fixedRightTS.css('top', anchorHeight);
var rightBoundingTS = fixedRightTS[0].getBoundingClientRect();
iterateRightpads(function (containerTS) {
var containerBoundingTS = containerTS.getBoundingClientRect();
if (containerBoundingTS.right >= rightBoundingTS.left) {
$(containerTS).css('padding-right', rightBoundingTS.width + 16);
}
});
} else {
fixedRightTS.css('top', '');
iterateRightpads(function (containerTS) {
$(containerTS).css('padding-right', '');
});
}
})();
}
function scrollAdjustmentTS() {
if (!fixedTopTS || fixedTopTS.length !== 1 || !topAttachTS || topAttachTS.length !== 1) return;
var topPosition = fixedTopTS.css('position');
if (topPosition === 'fixed' || topPosition === 'absolute') {
var anchorBounding = anchor[0].getBoundingClientRect();
var attachBounding = topAttachTS[0].getBoundingClientRect();
var scrollTop = $(window).scrollTop();