From 5f493cfc74c3def557a189eca9e47dfd02084e09 Mon Sep 17 00:00:00 2001 From: Johann-S Date: Mon, 29 May 2017 21:46:11 +0200 Subject: Remove the use of x-arrow attribute for Tooltips/Popovers arrows --- js/src/popover.js | 2 +- js/src/tooltip.js | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'js') diff --git a/js/src/popover.js b/js/src/popover.js index a068420d6..13c109b2c 100644 --- a/js/src/popover.js +++ b/js/src/popover.js @@ -30,7 +30,7 @@ const Popover = (($) => { trigger : 'click', content : '', template : '' }) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 1d53b0470..c7c7b9f9d 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -61,7 +61,7 @@ const Tooltip = (($) => { const Default = { animation : true, template : '', trigger : 'hover focus', title : '', @@ -99,7 +99,8 @@ const Tooltip = (($) => { const Selector = { TOOLTIP : '.tooltip', - TOOLTIP_INNER : '.tooltip-inner' + TOOLTIP_INNER : '.tooltip-inner', + ARROW : '.arrow' } const Trigger = { @@ -288,16 +289,19 @@ const Tooltip = (($) => { $(this.element).trigger(this.constructor.Event.INSERTED) this._popper = new Popper(this.element, tip, { - placement : attachment, - modifiers : { - offset : { - offset : this.config.offset + placement: attachment, + modifiers: { + offset: { + offset: this.config.offset }, - flip : { - behavior : this.config.fallbackPlacement + flip: { + behavior: this.config.fallbackPlacement + }, + arrow: { + element: Selector.ARROW } }, - onCreate : (data) => { + onCreate: (data) => { if (data.originalPlacement !== data.placement) { this._handlePopperPlacementChange(data) } -- cgit v1.2.3