Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../includes/tether
File: tether.js
return;
[500] Fix | Delete
}
[501] Fix | Delete
[502] Fix | Delete
if (typeof lastCall !== 'undefined' && now() - lastCall < 10) {
[503] Fix | Delete
// Some browsers call events a little too frequently, refuse to run more than is reasonable
[504] Fix | Delete
return;
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
if (pendingTimeout != null) {
[508] Fix | Delete
clearTimeout(pendingTimeout);
[509] Fix | Delete
pendingTimeout = null;
[510] Fix | Delete
}
[511] Fix | Delete
[512] Fix | Delete
lastCall = now();
[513] Fix | Delete
position();
[514] Fix | Delete
lastDuration = now() - lastCall;
[515] Fix | Delete
};
[516] Fix | Delete
[517] Fix | Delete
if (typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {
[518] Fix | Delete
['resize', 'scroll', 'touchmove'].forEach(function (event) {
[519] Fix | Delete
window.addEventListener(event, tick);
[520] Fix | Delete
});
[521] Fix | Delete
}
[522] Fix | Delete
})();
[523] Fix | Delete
[524] Fix | Delete
var MIRROR_LR = {
[525] Fix | Delete
center: 'center',
[526] Fix | Delete
left: 'right',
[527] Fix | Delete
right: 'left'
[528] Fix | Delete
};
[529] Fix | Delete
[530] Fix | Delete
var MIRROR_TB = {
[531] Fix | Delete
middle: 'middle',
[532] Fix | Delete
top: 'bottom',
[533] Fix | Delete
bottom: 'top'
[534] Fix | Delete
};
[535] Fix | Delete
[536] Fix | Delete
var OFFSET_MAP = {
[537] Fix | Delete
top: 0,
[538] Fix | Delete
left: 0,
[539] Fix | Delete
middle: '50%',
[540] Fix | Delete
center: '50%',
[541] Fix | Delete
bottom: '100%',
[542] Fix | Delete
right: '100%'
[543] Fix | Delete
};
[544] Fix | Delete
[545] Fix | Delete
var autoToFixedAttachment = function autoToFixedAttachment(attachment, relativeToAttachment) {
[546] Fix | Delete
var left = attachment.left;
[547] Fix | Delete
var top = attachment.top;
[548] Fix | Delete
[549] Fix | Delete
if (left === 'auto') {
[550] Fix | Delete
left = MIRROR_LR[relativeToAttachment.left];
[551] Fix | Delete
}
[552] Fix | Delete
[553] Fix | Delete
if (top === 'auto') {
[554] Fix | Delete
top = MIRROR_TB[relativeToAttachment.top];
[555] Fix | Delete
}
[556] Fix | Delete
[557] Fix | Delete
return { left: left, top: top };
[558] Fix | Delete
};
[559] Fix | Delete
[560] Fix | Delete
var attachmentToOffset = function attachmentToOffset(attachment) {
[561] Fix | Delete
var left = attachment.left;
[562] Fix | Delete
var top = attachment.top;
[563] Fix | Delete
[564] Fix | Delete
if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {
[565] Fix | Delete
left = OFFSET_MAP[attachment.left];
[566] Fix | Delete
}
[567] Fix | Delete
[568] Fix | Delete
if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {
[569] Fix | Delete
top = OFFSET_MAP[attachment.top];
[570] Fix | Delete
}
[571] Fix | Delete
[572] Fix | Delete
return { left: left, top: top };
[573] Fix | Delete
};
[574] Fix | Delete
[575] Fix | Delete
function addOffset() {
[576] Fix | Delete
var out = { top: 0, left: 0 };
[577] Fix | Delete
[578] Fix | Delete
for (var _len = arguments.length, offsets = Array(_len), _key = 0; _key < _len; _key++) {
[579] Fix | Delete
offsets[_key] = arguments[_key];
[580] Fix | Delete
}
[581] Fix | Delete
[582] Fix | Delete
offsets.forEach(function (_ref) {
[583] Fix | Delete
var top = _ref.top;
[584] Fix | Delete
var left = _ref.left;
[585] Fix | Delete
[586] Fix | Delete
if (typeof top === 'string') {
[587] Fix | Delete
top = parseFloat(top, 10);
[588] Fix | Delete
}
[589] Fix | Delete
if (typeof left === 'string') {
[590] Fix | Delete
left = parseFloat(left, 10);
[591] Fix | Delete
}
[592] Fix | Delete
[593] Fix | Delete
out.top += top;
[594] Fix | Delete
out.left += left;
[595] Fix | Delete
});
[596] Fix | Delete
[597] Fix | Delete
return out;
[598] Fix | Delete
}
[599] Fix | Delete
[600] Fix | Delete
function offsetToPx(offset, size) {
[601] Fix | Delete
if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {
[602] Fix | Delete
offset.left = parseFloat(offset.left, 10) / 100 * size.width;
[603] Fix | Delete
}
[604] Fix | Delete
if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {
[605] Fix | Delete
offset.top = parseFloat(offset.top, 10) / 100 * size.height;
[606] Fix | Delete
}
[607] Fix | Delete
[608] Fix | Delete
return offset;
[609] Fix | Delete
}
[610] Fix | Delete
[611] Fix | Delete
var parseOffset = function parseOffset(value) {
[612] Fix | Delete
var _value$split = value.split(' ');
[613] Fix | Delete
[614] Fix | Delete
var _value$split2 = _slicedToArray(_value$split, 2);
[615] Fix | Delete
[616] Fix | Delete
var top = _value$split2[0];
[617] Fix | Delete
var left = _value$split2[1];
[618] Fix | Delete
[619] Fix | Delete
return { top: top, left: left };
[620] Fix | Delete
};
[621] Fix | Delete
var parseAttachment = parseOffset;
[622] Fix | Delete
[623] Fix | Delete
var TetherClass = (function (_Evented) {
[624] Fix | Delete
_inherits(TetherClass, _Evented);
[625] Fix | Delete
[626] Fix | Delete
function TetherClass(options) {
[627] Fix | Delete
var _this = this;
[628] Fix | Delete
[629] Fix | Delete
_classCallCheck(this, TetherClass);
[630] Fix | Delete
[631] Fix | Delete
_get(Object.getPrototypeOf(TetherClass.prototype), 'constructor', this).call(this);
[632] Fix | Delete
this.position = this.position.bind(this);
[633] Fix | Delete
[634] Fix | Delete
tethers.push(this);
[635] Fix | Delete
[636] Fix | Delete
this.history = [];
[637] Fix | Delete
[638] Fix | Delete
this.setOptions(options, false);
[639] Fix | Delete
[640] Fix | Delete
TetherBase.modules.forEach(function (module) {
[641] Fix | Delete
if (typeof module.initialize !== 'undefined') {
[642] Fix | Delete
module.initialize.call(_this);
[643] Fix | Delete
}
[644] Fix | Delete
});
[645] Fix | Delete
[646] Fix | Delete
this.position();
[647] Fix | Delete
}
[648] Fix | Delete
[649] Fix | Delete
_createClass(TetherClass, [{
[650] Fix | Delete
key: 'getClass',
[651] Fix | Delete
value: function getClass() {
[652] Fix | Delete
var key = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
[653] Fix | Delete
var classes = this.options.classes;
[654] Fix | Delete
[655] Fix | Delete
if (typeof classes !== 'undefined' && classes[key]) {
[656] Fix | Delete
return this.options.classes[key];
[657] Fix | Delete
} else if (this.options.classPrefix) {
[658] Fix | Delete
return this.options.classPrefix + '-' + key;
[659] Fix | Delete
} else {
[660] Fix | Delete
return key;
[661] Fix | Delete
}
[662] Fix | Delete
}
[663] Fix | Delete
}, {
[664] Fix | Delete
key: 'setOptions',
[665] Fix | Delete
value: function setOptions(options) {
[666] Fix | Delete
var _this2 = this;
[667] Fix | Delete
[668] Fix | Delete
var pos = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
[669] Fix | Delete
[670] Fix | Delete
var defaults = {
[671] Fix | Delete
offset: '0 0',
[672] Fix | Delete
targetOffset: '0 0',
[673] Fix | Delete
targetAttachment: 'auto auto',
[674] Fix | Delete
classPrefix: 'tether'
[675] Fix | Delete
};
[676] Fix | Delete
[677] Fix | Delete
this.options = extend(defaults, options);
[678] Fix | Delete
[679] Fix | Delete
var _options = this.options;
[680] Fix | Delete
var element = _options.element;
[681] Fix | Delete
var target = _options.target;
[682] Fix | Delete
var targetModifier = _options.targetModifier;
[683] Fix | Delete
[684] Fix | Delete
this.element = element;
[685] Fix | Delete
this.target = target;
[686] Fix | Delete
this.targetModifier = targetModifier;
[687] Fix | Delete
[688] Fix | Delete
if (this.target === 'viewport') {
[689] Fix | Delete
this.target = document.body;
[690] Fix | Delete
this.targetModifier = 'visible';
[691] Fix | Delete
} else if (this.target === 'scroll-handle') {
[692] Fix | Delete
this.target = document.body;
[693] Fix | Delete
this.targetModifier = 'scroll-handle';
[694] Fix | Delete
}
[695] Fix | Delete
[696] Fix | Delete
['element', 'target'].forEach(function (key) {
[697] Fix | Delete
if (typeof _this2[key] === 'undefined') {
[698] Fix | Delete
throw new Error('Tether Error: Both element and target must be defined');
[699] Fix | Delete
}
[700] Fix | Delete
[701] Fix | Delete
if (typeof _this2[key].jquery !== 'undefined') {
[702] Fix | Delete
_this2[key] = _this2[key][0];
[703] Fix | Delete
} else if (typeof _this2[key] === 'string') {
[704] Fix | Delete
_this2[key] = document.querySelector(_this2[key]);
[705] Fix | Delete
}
[706] Fix | Delete
});
[707] Fix | Delete
[708] Fix | Delete
addClass(this.element, this.getClass('element'));
[709] Fix | Delete
if (!(this.options.addTargetClasses === false)) {
[710] Fix | Delete
addClass(this.target, this.getClass('target'));
[711] Fix | Delete
}
[712] Fix | Delete
[713] Fix | Delete
if (!this.options.attachment) {
[714] Fix | Delete
throw new Error('Tether Error: You must provide an attachment');
[715] Fix | Delete
}
[716] Fix | Delete
[717] Fix | Delete
this.targetAttachment = parseAttachment(this.options.targetAttachment);
[718] Fix | Delete
this.attachment = parseAttachment(this.options.attachment);
[719] Fix | Delete
this.offset = parseOffset(this.options.offset);
[720] Fix | Delete
this.targetOffset = parseOffset(this.options.targetOffset);
[721] Fix | Delete
[722] Fix | Delete
if (typeof this.scrollParents !== 'undefined') {
[723] Fix | Delete
this.disable();
[724] Fix | Delete
}
[725] Fix | Delete
[726] Fix | Delete
if (this.targetModifier === 'scroll-handle') {
[727] Fix | Delete
this.scrollParents = [this.target];
[728] Fix | Delete
} else {
[729] Fix | Delete
this.scrollParents = getScrollParents(this.target);
[730] Fix | Delete
}
[731] Fix | Delete
[732] Fix | Delete
if (!(this.options.enabled === false)) {
[733] Fix | Delete
this.enable(pos);
[734] Fix | Delete
}
[735] Fix | Delete
}
[736] Fix | Delete
}, {
[737] Fix | Delete
key: 'getTargetBounds',
[738] Fix | Delete
value: function getTargetBounds() {
[739] Fix | Delete
if (typeof this.targetModifier !== 'undefined') {
[740] Fix | Delete
if (this.targetModifier === 'visible') {
[741] Fix | Delete
if (this.target === document.body) {
[742] Fix | Delete
return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };
[743] Fix | Delete
} else {
[744] Fix | Delete
var bounds = getBounds(this.target);
[745] Fix | Delete
[746] Fix | Delete
var out = {
[747] Fix | Delete
height: bounds.height,
[748] Fix | Delete
width: bounds.width,
[749] Fix | Delete
top: bounds.top,
[750] Fix | Delete
left: bounds.left
[751] Fix | Delete
};
[752] Fix | Delete
[753] Fix | Delete
out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));
[754] Fix | Delete
out.height = Math.min(out.height, bounds.height - (bounds.top + bounds.height - (pageYOffset + innerHeight)));
[755] Fix | Delete
out.height = Math.min(innerHeight, out.height);
[756] Fix | Delete
out.height -= 2;
[757] Fix | Delete
[758] Fix | Delete
out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));
[759] Fix | Delete
out.width = Math.min(out.width, bounds.width - (bounds.left + bounds.width - (pageXOffset + innerWidth)));
[760] Fix | Delete
out.width = Math.min(innerWidth, out.width);
[761] Fix | Delete
out.width -= 2;
[762] Fix | Delete
[763] Fix | Delete
if (out.top < pageYOffset) {
[764] Fix | Delete
out.top = pageYOffset;
[765] Fix | Delete
}
[766] Fix | Delete
if (out.left < pageXOffset) {
[767] Fix | Delete
out.left = pageXOffset;
[768] Fix | Delete
}
[769] Fix | Delete
[770] Fix | Delete
return out;
[771] Fix | Delete
}
[772] Fix | Delete
} else if (this.targetModifier === 'scroll-handle') {
[773] Fix | Delete
var bounds = undefined;
[774] Fix | Delete
var target = this.target;
[775] Fix | Delete
if (target === document.body) {
[776] Fix | Delete
target = document.documentElement;
[777] Fix | Delete
[778] Fix | Delete
bounds = {
[779] Fix | Delete
left: pageXOffset,
[780] Fix | Delete
top: pageYOffset,
[781] Fix | Delete
height: innerHeight,
[782] Fix | Delete
width: innerWidth
[783] Fix | Delete
};
[784] Fix | Delete
} else {
[785] Fix | Delete
bounds = getBounds(target);
[786] Fix | Delete
}
[787] Fix | Delete
[788] Fix | Delete
var style = getComputedStyle(target);
[789] Fix | Delete
[790] Fix | Delete
var hasBottomScroll = target.scrollWidth > target.clientWidth || [style.overflow, style.overflowX].indexOf('scroll') >= 0 || this.target !== document.body;
[791] Fix | Delete
[792] Fix | Delete
var scrollBottom = 0;
[793] Fix | Delete
if (hasBottomScroll) {
[794] Fix | Delete
scrollBottom = 15;
[795] Fix | Delete
}
[796] Fix | Delete
[797] Fix | Delete
var height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;
[798] Fix | Delete
[799] Fix | Delete
var out = {
[800] Fix | Delete
width: 15,
[801] Fix | Delete
height: height * 0.975 * (height / target.scrollHeight),
[802] Fix | Delete
left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
[803] Fix | Delete
};
[804] Fix | Delete
[805] Fix | Delete
var fitAdj = 0;
[806] Fix | Delete
if (height < 408 && this.target === document.body) {
[807] Fix | Delete
fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
[808] Fix | Delete
}
[809] Fix | Delete
[810] Fix | Delete
if (this.target !== document.body) {
[811] Fix | Delete
out.height = Math.max(out.height, 24);
[812] Fix | Delete
}
[813] Fix | Delete
[814] Fix | Delete
var scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);
[815] Fix | Delete
out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);
[816] Fix | Delete
[817] Fix | Delete
if (this.target === document.body) {
[818] Fix | Delete
out.height = Math.max(out.height, 24);
[819] Fix | Delete
}
[820] Fix | Delete
[821] Fix | Delete
return out;
[822] Fix | Delete
}
[823] Fix | Delete
} else {
[824] Fix | Delete
return getBounds(this.target);
[825] Fix | Delete
}
[826] Fix | Delete
}
[827] Fix | Delete
}, {
[828] Fix | Delete
key: 'clearCache',
[829] Fix | Delete
value: function clearCache() {
[830] Fix | Delete
this._cache = {};
[831] Fix | Delete
}
[832] Fix | Delete
}, {
[833] Fix | Delete
key: 'cache',
[834] Fix | Delete
value: function cache(k, getter) {
[835] Fix | Delete
// More than one module will often need the same DOM info, so
[836] Fix | Delete
// we keep a cache which is cleared on each position call
[837] Fix | Delete
if (typeof this._cache === 'undefined') {
[838] Fix | Delete
this._cache = {};
[839] Fix | Delete
}
[840] Fix | Delete
[841] Fix | Delete
if (typeof this._cache[k] === 'undefined') {
[842] Fix | Delete
this._cache[k] = getter.call(this);
[843] Fix | Delete
}
[844] Fix | Delete
[845] Fix | Delete
return this._cache[k];
[846] Fix | Delete
}
[847] Fix | Delete
}, {
[848] Fix | Delete
key: 'enable',
[849] Fix | Delete
value: function enable() {
[850] Fix | Delete
var _this3 = this;
[851] Fix | Delete
[852] Fix | Delete
var pos = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
[853] Fix | Delete
[854] Fix | Delete
if (!(this.options.addTargetClasses === false)) {
[855] Fix | Delete
addClass(this.target, this.getClass('enabled'));
[856] Fix | Delete
}
[857] Fix | Delete
addClass(this.element, this.getClass('enabled'));
[858] Fix | Delete
this.enabled = true;
[859] Fix | Delete
[860] Fix | Delete
this.scrollParents.forEach(function (parent) {
[861] Fix | Delete
if (parent !== _this3.target.ownerDocument) {
[862] Fix | Delete
parent.addEventListener('scroll', _this3.position);
[863] Fix | Delete
}
[864] Fix | Delete
});
[865] Fix | Delete
[866] Fix | Delete
if (pos) {
[867] Fix | Delete
this.position();
[868] Fix | Delete
}
[869] Fix | Delete
}
[870] Fix | Delete
}, {
[871] Fix | Delete
key: 'disable',
[872] Fix | Delete
value: function disable() {
[873] Fix | Delete
var _this4 = this;
[874] Fix | Delete
[875] Fix | Delete
removeClass(this.target, this.getClass('enabled'));
[876] Fix | Delete
removeClass(this.element, this.getClass('enabled'));
[877] Fix | Delete
this.enabled = false;
[878] Fix | Delete
[879] Fix | Delete
if (typeof this.scrollParents !== 'undefined') {
[880] Fix | Delete
this.scrollParents.forEach(function (parent) {
[881] Fix | Delete
parent.removeEventListener('scroll', _this4.position);
[882] Fix | Delete
});
[883] Fix | Delete
}
[884] Fix | Delete
}
[885] Fix | Delete
}, {
[886] Fix | Delete
key: 'destroy',
[887] Fix | Delete
value: function destroy() {
[888] Fix | Delete
var _this5 = this;
[889] Fix | Delete
[890] Fix | Delete
this.disable();
[891] Fix | Delete
[892] Fix | Delete
tethers.forEach(function (tether, i) {
[893] Fix | Delete
if (tether === _this5) {
[894] Fix | Delete
tethers.splice(i, 1);
[895] Fix | Delete
}
[896] Fix | Delete
});
[897] Fix | Delete
[898] Fix | Delete
// Remove any elements we were using for convenience from the DOM
[899] Fix | Delete
if (tethers.length === 0) {
[900] Fix | Delete
removeUtilElements();
[901] Fix | Delete
}
[902] Fix | Delete
}
[903] Fix | Delete
}, {
[904] Fix | Delete
key: 'updateAttachClasses',
[905] Fix | Delete
value: function updateAttachClasses(elementAttach, targetAttach) {
[906] Fix | Delete
var _this6 = this;
[907] Fix | Delete
[908] Fix | Delete
elementAttach = elementAttach || this.attachment;
[909] Fix | Delete
targetAttach = targetAttach || this.targetAttachment;
[910] Fix | Delete
var sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];
[911] Fix | Delete
[912] Fix | Delete
if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {
[913] Fix | Delete
// updateAttachClasses can be called more than once in a position call, so
[914] Fix | Delete
// we need to clean up after ourselves such that when the last defer gets
[915] Fix | Delete
// ran it doesn't add any extra classes from previous calls.
[916] Fix | Delete
this._addAttachClasses.splice(0, this._addAttachClasses.length);
[917] Fix | Delete
}
[918] Fix | Delete
[919] Fix | Delete
if (typeof this._addAttachClasses === 'undefined') {
[920] Fix | Delete
this._addAttachClasses = [];
[921] Fix | Delete
}
[922] Fix | Delete
var add = this._addAttachClasses;
[923] Fix | Delete
[924] Fix | Delete
if (elementAttach.top) {
[925] Fix | Delete
add.push(this.getClass('element-attached') + '-' + elementAttach.top);
[926] Fix | Delete
}
[927] Fix | Delete
if (elementAttach.left) {
[928] Fix | Delete
add.push(this.getClass('element-attached') + '-' + elementAttach.left);
[929] Fix | Delete
}
[930] Fix | Delete
if (targetAttach.top) {
[931] Fix | Delete
add.push(this.getClass('target-attached') + '-' + targetAttach.top);
[932] Fix | Delete
}
[933] Fix | Delete
if (targetAttach.left) {
[934] Fix | Delete
add.push(this.getClass('target-attached') + '-' + targetAttach.left);
[935] Fix | Delete
}
[936] Fix | Delete
[937] Fix | Delete
var all = [];
[938] Fix | Delete
sides.forEach(function (side) {
[939] Fix | Delete
all.push(_this6.getClass('element-attached') + '-' + side);
[940] Fix | Delete
all.push(_this6.getClass('target-attached') + '-' + side);
[941] Fix | Delete
});
[942] Fix | Delete
[943] Fix | Delete
defer(function () {
[944] Fix | Delete
if (!(typeof _this6._addAttachClasses !== 'undefined')) {
[945] Fix | Delete
return;
[946] Fix | Delete
}
[947] Fix | Delete
[948] Fix | Delete
updateClasses(_this6.element, _this6._addAttachClasses, all);
[949] Fix | Delete
if (!(_this6.options.addTargetClasses === false)) {
[950] Fix | Delete
updateClasses(_this6.target, _this6._addAttachClasses, all);
[951] Fix | Delete
}
[952] Fix | Delete
[953] Fix | Delete
delete _this6._addAttachClasses;
[954] Fix | Delete
});
[955] Fix | Delete
}
[956] Fix | Delete
}, {
[957] Fix | Delete
key: 'position',
[958] Fix | Delete
value: function position() {
[959] Fix | Delete
var _this7 = this;
[960] Fix | Delete
[961] Fix | Delete
var flushChanges = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
[962] Fix | Delete
[963] Fix | Delete
// flushChanges commits the changes immediately, leave true unless you are positioning multiple
[964] Fix | Delete
// tethers (in which case call Tether.Utils.flush yourself when you're done)
[965] Fix | Delete
[966] Fix | Delete
if (!this.enabled) {
[967] Fix | Delete
return;
[968] Fix | Delete
}
[969] Fix | Delete
[970] Fix | Delete
this.clearCache();
[971] Fix | Delete
[972] Fix | Delete
// Turn 'auto' attachments into the appropriate corner or edge
[973] Fix | Delete
var targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);
[974] Fix | Delete
[975] Fix | Delete
this.updateAttachClasses(this.attachment, targetAttachment);
[976] Fix | Delete
[977] Fix | Delete
var elementPos = this.cache('element-bounds', function () {
[978] Fix | Delete
return getBounds(_this7.element);
[979] Fix | Delete
});
[980] Fix | Delete
[981] Fix | Delete
var width = elementPos.width;
[982] Fix | Delete
var height = elementPos.height;
[983] Fix | Delete
[984] Fix | Delete
if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
[985] Fix | Delete
var _lastSize = this.lastSize;
[986] Fix | Delete
[987] Fix | Delete
// We cache the height and width to make it possible to position elements that are
[988] Fix | Delete
// getting hidden.
[989] Fix | Delete
width = _lastSize.width;
[990] Fix | Delete
height = _lastSize.height;
[991] Fix | Delete
} else {
[992] Fix | Delete
this.lastSize = { width: width, height: height };
[993] Fix | Delete
}
[994] Fix | Delete
[995] Fix | Delete
var targetPos = this.cache('target-bounds', function () {
[996] Fix | Delete
return _this7.getTargetBounds();
[997] Fix | Delete
});
[998] Fix | Delete
var targetSize = targetPos;
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function