mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-27 07:14:36 +02:00
Add an update method to allow to update position for Tooltip/Popover/Dropdown manually
This commit is contained in:
@@ -185,8 +185,14 @@ const Dropdown = (($) => {
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
this._popper = null
|
||||
}
|
||||
|
||||
update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// private
|
||||
|
||||
|
@@ -227,6 +227,9 @@ const Tooltip = (($) => {
|
||||
this._timeout = null
|
||||
this._hoverState = null
|
||||
this._activeTrigger = null
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy()
|
||||
}
|
||||
this._popper = null
|
||||
|
||||
this.element = null
|
||||
@@ -385,6 +388,11 @@ const Tooltip = (($) => {
|
||||
|
||||
}
|
||||
|
||||
update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
// protected
|
||||
|
||||
@@ -646,8 +654,8 @@ const Tooltip = (($) => {
|
||||
}
|
||||
|
||||
_handlePopperPlacementChange(data) {
|
||||
this._cleanTipClass()
|
||||
this.addAttachmentClass(this._getAttachment(data.placement))
|
||||
this._cleanTipClass()
|
||||
this.addAttachmentClass(this._getAttachment(data.placement))
|
||||
}
|
||||
|
||||
// static
|
||||
|
Reference in New Issue
Block a user