Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaƫl Poupard <gael.poupard@orange.com>2020-12-03 16:08:31 +0300
committerXhmikosR <xhmikosr@gmail.com>2020-12-04 08:52:03 +0300
commit0a141dae94eb9efa301beeb55eed4ebc56e20e44 (patch)
tree558c8d7a46a534dd30be0b449675c2293ea31f09 /js/dist/tooltip.js
parent53d861c814eab1d00f4420ffd4208f3f9c2849b0 (diff)
chore(dist): generate dist files
Diffstat (limited to 'js/dist/tooltip.js')
-rw-r--r--js/dist/tooltip.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/js/dist/tooltip.js b/js/dist/tooltip.js
index b5e98a650c..6e7b9201a1 100644
--- a/js/dist/tooltip.js
+++ b/js/dist/tooltip.js
@@ -156,6 +156,8 @@
}
};
+ var isRTL = document.documentElement.dir === 'rtl';
+
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.0.0-alpha3): util/sanitizer.js
@@ -368,9 +370,9 @@
var AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
- RIGHT: 'right',
+ RIGHT: isRTL ? 'left' : 'right',
BOTTOM: 'bottom',
- LEFT: 'left'
+ LEFT: isRTL ? 'right' : 'left'
};
var Default = {
animation: true,
@@ -732,6 +734,18 @@
}
return title;
+ };
+
+ _proto.updateAttachment = function updateAttachment(attachment) {
+ if (attachment === 'right') {
+ return 'end';
+ }
+
+ if (attachment === 'left') {
+ return 'start';
+ }
+
+ return attachment;
} // Private
;
@@ -765,7 +779,7 @@
};
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
- this.getTipElement().classList.add(CLASS_PREFIX + "-" + attachment);
+ this.getTipElement().classList.add(CLASS_PREFIX + "-" + this.updateAttachment(attachment));
};
_proto._getOffset = function _getOffset() {