Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/tether
File: tether.js
}
[1500] Fix | Delete
}
[1501] Fix | Delete
}
[1502] Fix | Delete
[1503] Fix | Delete
if (changeAttachX === 'target' || changeAttachX === 'both') {
[1504] Fix | Delete
if (left < bounds[0] && tAttachment.left === 'left') {
[1505] Fix | Delete
left += targetWidth;
[1506] Fix | Delete
tAttachment.left = 'right';
[1507] Fix | Delete
}
[1508] Fix | Delete
[1509] Fix | Delete
if (left + width > bounds[2] && tAttachment.left === 'right') {
[1510] Fix | Delete
left -= targetWidth;
[1511] Fix | Delete
tAttachment.left = 'left';
[1512] Fix | Delete
}
[1513] Fix | Delete
}
[1514] Fix | Delete
[1515] Fix | Delete
if (changeAttachX === 'together') {
[1516] Fix | Delete
if (left < bounds[0] && tAttachment.left === 'left') {
[1517] Fix | Delete
if (eAttachment.left === 'right') {
[1518] Fix | Delete
left += targetWidth;
[1519] Fix | Delete
tAttachment.left = 'right';
[1520] Fix | Delete
[1521] Fix | Delete
left += width;
[1522] Fix | Delete
eAttachment.left = 'left';
[1523] Fix | Delete
} else if (eAttachment.left === 'left') {
[1524] Fix | Delete
left += targetWidth;
[1525] Fix | Delete
tAttachment.left = 'right';
[1526] Fix | Delete
[1527] Fix | Delete
left -= width;
[1528] Fix | Delete
eAttachment.left = 'right';
[1529] Fix | Delete
}
[1530] Fix | Delete
} else if (left + width > bounds[2] && tAttachment.left === 'right') {
[1531] Fix | Delete
if (eAttachment.left === 'left') {
[1532] Fix | Delete
left -= targetWidth;
[1533] Fix | Delete
tAttachment.left = 'left';
[1534] Fix | Delete
[1535] Fix | Delete
left -= width;
[1536] Fix | Delete
eAttachment.left = 'right';
[1537] Fix | Delete
} else if (eAttachment.left === 'right') {
[1538] Fix | Delete
left -= targetWidth;
[1539] Fix | Delete
tAttachment.left = 'left';
[1540] Fix | Delete
[1541] Fix | Delete
left += width;
[1542] Fix | Delete
eAttachment.left = 'left';
[1543] Fix | Delete
}
[1544] Fix | Delete
} else if (tAttachment.left === 'center') {
[1545] Fix | Delete
if (left + width > bounds[2] && eAttachment.left === 'left') {
[1546] Fix | Delete
left -= width;
[1547] Fix | Delete
eAttachment.left = 'right';
[1548] Fix | Delete
} else if (left < bounds[0] && eAttachment.left === 'right') {
[1549] Fix | Delete
left += width;
[1550] Fix | Delete
eAttachment.left = 'left';
[1551] Fix | Delete
}
[1552] Fix | Delete
}
[1553] Fix | Delete
}
[1554] Fix | Delete
[1555] Fix | Delete
if (changeAttachY === 'element' || changeAttachY === 'both') {
[1556] Fix | Delete
if (top < bounds[1] && eAttachment.top === 'bottom') {
[1557] Fix | Delete
top += height;
[1558] Fix | Delete
eAttachment.top = 'top';
[1559] Fix | Delete
}
[1560] Fix | Delete
[1561] Fix | Delete
if (top + height > bounds[3] && eAttachment.top === 'top') {
[1562] Fix | Delete
top -= height;
[1563] Fix | Delete
eAttachment.top = 'bottom';
[1564] Fix | Delete
}
[1565] Fix | Delete
}
[1566] Fix | Delete
[1567] Fix | Delete
if (changeAttachX === 'element' || changeAttachX === 'both') {
[1568] Fix | Delete
if (left < bounds[0]) {
[1569] Fix | Delete
if (eAttachment.left === 'right') {
[1570] Fix | Delete
left += width;
[1571] Fix | Delete
eAttachment.left = 'left';
[1572] Fix | Delete
} else if (eAttachment.left === 'center') {
[1573] Fix | Delete
left += width / 2;
[1574] Fix | Delete
eAttachment.left = 'left';
[1575] Fix | Delete
}
[1576] Fix | Delete
}
[1577] Fix | Delete
[1578] Fix | Delete
if (left + width > bounds[2]) {
[1579] Fix | Delete
if (eAttachment.left === 'left') {
[1580] Fix | Delete
left -= width;
[1581] Fix | Delete
eAttachment.left = 'right';
[1582] Fix | Delete
} else if (eAttachment.left === 'center') {
[1583] Fix | Delete
left -= width / 2;
[1584] Fix | Delete
eAttachment.left = 'right';
[1585] Fix | Delete
}
[1586] Fix | Delete
}
[1587] Fix | Delete
}
[1588] Fix | Delete
[1589] Fix | Delete
if (typeof pin === 'string') {
[1590] Fix | Delete
pin = pin.split(',').map(function (p) {
[1591] Fix | Delete
return p.trim();
[1592] Fix | Delete
});
[1593] Fix | Delete
} else if (pin === true) {
[1594] Fix | Delete
pin = ['top', 'left', 'right', 'bottom'];
[1595] Fix | Delete
}
[1596] Fix | Delete
[1597] Fix | Delete
pin = pin || [];
[1598] Fix | Delete
[1599] Fix | Delete
var pinned = [];
[1600] Fix | Delete
var oob = [];
[1601] Fix | Delete
[1602] Fix | Delete
if (top < bounds[1]) {
[1603] Fix | Delete
if (pin.indexOf('top') >= 0) {
[1604] Fix | Delete
top = bounds[1];
[1605] Fix | Delete
pinned.push('top');
[1606] Fix | Delete
} else {
[1607] Fix | Delete
oob.push('top');
[1608] Fix | Delete
}
[1609] Fix | Delete
}
[1610] Fix | Delete
[1611] Fix | Delete
if (top + height > bounds[3]) {
[1612] Fix | Delete
if (pin.indexOf('bottom') >= 0) {
[1613] Fix | Delete
top = bounds[3] - height;
[1614] Fix | Delete
pinned.push('bottom');
[1615] Fix | Delete
} else {
[1616] Fix | Delete
oob.push('bottom');
[1617] Fix | Delete
}
[1618] Fix | Delete
}
[1619] Fix | Delete
[1620] Fix | Delete
if (left < bounds[0]) {
[1621] Fix | Delete
if (pin.indexOf('left') >= 0) {
[1622] Fix | Delete
left = bounds[0];
[1623] Fix | Delete
pinned.push('left');
[1624] Fix | Delete
} else {
[1625] Fix | Delete
oob.push('left');
[1626] Fix | Delete
}
[1627] Fix | Delete
}
[1628] Fix | Delete
[1629] Fix | Delete
if (left + width > bounds[2]) {
[1630] Fix | Delete
if (pin.indexOf('right') >= 0) {
[1631] Fix | Delete
left = bounds[2] - width;
[1632] Fix | Delete
pinned.push('right');
[1633] Fix | Delete
} else {
[1634] Fix | Delete
oob.push('right');
[1635] Fix | Delete
}
[1636] Fix | Delete
}
[1637] Fix | Delete
[1638] Fix | Delete
if (pinned.length) {
[1639] Fix | Delete
(function () {
[1640] Fix | Delete
var pinnedClass = undefined;
[1641] Fix | Delete
if (typeof _this.options.pinnedClass !== 'undefined') {
[1642] Fix | Delete
pinnedClass = _this.options.pinnedClass;
[1643] Fix | Delete
} else {
[1644] Fix | Delete
pinnedClass = _this.getClass('pinned');
[1645] Fix | Delete
}
[1646] Fix | Delete
[1647] Fix | Delete
addClasses.push(pinnedClass);
[1648] Fix | Delete
pinned.forEach(function (side) {
[1649] Fix | Delete
addClasses.push(pinnedClass + '-' + side);
[1650] Fix | Delete
});
[1651] Fix | Delete
})();
[1652] Fix | Delete
}
[1653] Fix | Delete
[1654] Fix | Delete
if (oob.length) {
[1655] Fix | Delete
(function () {
[1656] Fix | Delete
var oobClass = undefined;
[1657] Fix | Delete
if (typeof _this.options.outOfBoundsClass !== 'undefined') {
[1658] Fix | Delete
oobClass = _this.options.outOfBoundsClass;
[1659] Fix | Delete
} else {
[1660] Fix | Delete
oobClass = _this.getClass('out-of-bounds');
[1661] Fix | Delete
}
[1662] Fix | Delete
[1663] Fix | Delete
addClasses.push(oobClass);
[1664] Fix | Delete
oob.forEach(function (side) {
[1665] Fix | Delete
addClasses.push(oobClass + '-' + side);
[1666] Fix | Delete
});
[1667] Fix | Delete
})();
[1668] Fix | Delete
}
[1669] Fix | Delete
[1670] Fix | Delete
if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {
[1671] Fix | Delete
eAttachment.left = tAttachment.left = false;
[1672] Fix | Delete
}
[1673] Fix | Delete
if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {
[1674] Fix | Delete
eAttachment.top = tAttachment.top = false;
[1675] Fix | Delete
}
[1676] Fix | Delete
[1677] Fix | Delete
if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== _this.attachment.top || eAttachment.left !== _this.attachment.left) {
[1678] Fix | Delete
_this.updateAttachClasses(eAttachment, tAttachment);
[1679] Fix | Delete
_this.trigger('update', {
[1680] Fix | Delete
attachment: eAttachment,
[1681] Fix | Delete
targetAttachment: tAttachment
[1682] Fix | Delete
});
[1683] Fix | Delete
}
[1684] Fix | Delete
});
[1685] Fix | Delete
[1686] Fix | Delete
defer(function () {
[1687] Fix | Delete
if (!(_this.options.addTargetClasses === false)) {
[1688] Fix | Delete
updateClasses(_this.target, addClasses, allClasses);
[1689] Fix | Delete
}
[1690] Fix | Delete
updateClasses(_this.element, addClasses, allClasses);
[1691] Fix | Delete
});
[1692] Fix | Delete
[1693] Fix | Delete
return { top: top, left: left };
[1694] Fix | Delete
}
[1695] Fix | Delete
});
[1696] Fix | Delete
/* globals TetherBase */
[1697] Fix | Delete
[1698] Fix | Delete
'use strict';
[1699] Fix | Delete
[1700] Fix | Delete
var _TetherBase$Utils = TetherBase.Utils;
[1701] Fix | Delete
var getBounds = _TetherBase$Utils.getBounds;
[1702] Fix | Delete
var updateClasses = _TetherBase$Utils.updateClasses;
[1703] Fix | Delete
var defer = _TetherBase$Utils.defer;
[1704] Fix | Delete
[1705] Fix | Delete
TetherBase.modules.push({
[1706] Fix | Delete
position: function position(_ref) {
[1707] Fix | Delete
var _this = this;
[1708] Fix | Delete
[1709] Fix | Delete
var top = _ref.top;
[1710] Fix | Delete
var left = _ref.left;
[1711] Fix | Delete
[1712] Fix | Delete
var _cache = this.cache('element-bounds', function () {
[1713] Fix | Delete
return getBounds(_this.element);
[1714] Fix | Delete
});
[1715] Fix | Delete
[1716] Fix | Delete
var height = _cache.height;
[1717] Fix | Delete
var width = _cache.width;
[1718] Fix | Delete
[1719] Fix | Delete
var targetPos = this.getTargetBounds();
[1720] Fix | Delete
[1721] Fix | Delete
var bottom = top + height;
[1722] Fix | Delete
var right = left + width;
[1723] Fix | Delete
[1724] Fix | Delete
var abutted = [];
[1725] Fix | Delete
if (top <= targetPos.bottom && bottom >= targetPos.top) {
[1726] Fix | Delete
['left', 'right'].forEach(function (side) {
[1727] Fix | Delete
var targetPosSide = targetPos[side];
[1728] Fix | Delete
if (targetPosSide === left || targetPosSide === right) {
[1729] Fix | Delete
abutted.push(side);
[1730] Fix | Delete
}
[1731] Fix | Delete
});
[1732] Fix | Delete
}
[1733] Fix | Delete
[1734] Fix | Delete
if (left <= targetPos.right && right >= targetPos.left) {
[1735] Fix | Delete
['top', 'bottom'].forEach(function (side) {
[1736] Fix | Delete
var targetPosSide = targetPos[side];
[1737] Fix | Delete
if (targetPosSide === top || targetPosSide === bottom) {
[1738] Fix | Delete
abutted.push(side);
[1739] Fix | Delete
}
[1740] Fix | Delete
});
[1741] Fix | Delete
}
[1742] Fix | Delete
[1743] Fix | Delete
var allClasses = [];
[1744] Fix | Delete
var addClasses = [];
[1745] Fix | Delete
[1746] Fix | Delete
var sides = ['left', 'top', 'right', 'bottom'];
[1747] Fix | Delete
allClasses.push(this.getClass('abutted'));
[1748] Fix | Delete
sides.forEach(function (side) {
[1749] Fix | Delete
allClasses.push(_this.getClass('abutted') + '-' + side);
[1750] Fix | Delete
});
[1751] Fix | Delete
[1752] Fix | Delete
if (abutted.length) {
[1753] Fix | Delete
addClasses.push(this.getClass('abutted'));
[1754] Fix | Delete
}
[1755] Fix | Delete
[1756] Fix | Delete
abutted.forEach(function (side) {
[1757] Fix | Delete
addClasses.push(_this.getClass('abutted') + '-' + side);
[1758] Fix | Delete
});
[1759] Fix | Delete
[1760] Fix | Delete
defer(function () {
[1761] Fix | Delete
if (!(_this.options.addTargetClasses === false)) {
[1762] Fix | Delete
updateClasses(_this.target, addClasses, allClasses);
[1763] Fix | Delete
}
[1764] Fix | Delete
updateClasses(_this.element, addClasses, allClasses);
[1765] Fix | Delete
});
[1766] Fix | Delete
[1767] Fix | Delete
return true;
[1768] Fix | Delete
}
[1769] Fix | Delete
});
[1770] Fix | Delete
/* globals TetherBase */
[1771] Fix | Delete
[1772] Fix | Delete
'use strict';
[1773] Fix | Delete
[1774] Fix | Delete
var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
[1775] Fix | Delete
[1776] Fix | Delete
TetherBase.modules.push({
[1777] Fix | Delete
position: function position(_ref) {
[1778] Fix | Delete
var top = _ref.top;
[1779] Fix | Delete
var left = _ref.left;
[1780] Fix | Delete
[1781] Fix | Delete
if (!this.options.shift) {
[1782] Fix | Delete
return;
[1783] Fix | Delete
}
[1784] Fix | Delete
[1785] Fix | Delete
var shift = this.options.shift;
[1786] Fix | Delete
if (typeof this.options.shift === 'function') {
[1787] Fix | Delete
shift = this.options.shift.call(this, { top: top, left: left });
[1788] Fix | Delete
}
[1789] Fix | Delete
[1790] Fix | Delete
var shiftTop = undefined,
[1791] Fix | Delete
shiftLeft = undefined;
[1792] Fix | Delete
if (typeof shift === 'string') {
[1793] Fix | Delete
shift = shift.split(' ');
[1794] Fix | Delete
shift[1] = shift[1] || shift[0];
[1795] Fix | Delete
[1796] Fix | Delete
var _shift = shift;
[1797] Fix | Delete
[1798] Fix | Delete
var _shift2 = _slicedToArray(_shift, 2);
[1799] Fix | Delete
[1800] Fix | Delete
shiftTop = _shift2[0];
[1801] Fix | Delete
shiftLeft = _shift2[1];
[1802] Fix | Delete
[1803] Fix | Delete
shiftTop = parseFloat(shiftTop, 10);
[1804] Fix | Delete
shiftLeft = parseFloat(shiftLeft, 10);
[1805] Fix | Delete
} else {
[1806] Fix | Delete
shiftTop = shift.top;
[1807] Fix | Delete
shiftLeft = shift.left;
[1808] Fix | Delete
}
[1809] Fix | Delete
[1810] Fix | Delete
top += shiftTop;
[1811] Fix | Delete
left += shiftLeft;
[1812] Fix | Delete
[1813] Fix | Delete
return { top: top, left: left };
[1814] Fix | Delete
}
[1815] Fix | Delete
});
[1816] Fix | Delete
return Tether;
[1817] Fix | Delete
[1818] Fix | Delete
}));
[1819] Fix | Delete
[1820] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function