1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 13:29:06 +02:00

util: change isRTL to a function (#32446)

This allows the bundler to tree-shake the function.
This commit is contained in:
XhmikosR
2021-02-16 10:14:05 +02:00
committed by GitHub
parent 3602828a90
commit 92434fa30f
5 changed files with 17 additions and 19 deletions

View File

@@ -64,9 +64,9 @@ const DefaultType = {
const AttachmentMap = {
AUTO: 'auto',
TOP: 'top',
RIGHT: isRTL ? 'left' : 'right',
RIGHT: isRTL() ? 'left' : 'right',
BOTTOM: 'bottom',
LEFT: isRTL ? 'right' : 'left'
LEFT: isRTL() ? 'right' : 'left'
}
const Default = {
@@ -563,8 +563,7 @@ class Tooltip extends BaseComponent {
triggers.forEach(trigger => {
if (trigger === 'click') {
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event)
)
EventHandler.on(this._element, this.constructor.Event.CLICK, this.config.selector, event => this.toggle(event))
} else if (trigger !== TRIGGER_MANUAL) {
const eventIn = trigger === TRIGGER_HOVER ?
this.constructor.Event.MOUSEENTER :