offset : {
offset : this.config.offset
}
+ },
+ onCreate : (data) => {
+ this._handlePopperPlacementChange(data)
+ },
+ onUpdate : (data) => {
+ this._handlePopperPlacementChange(data)
}
})
}
}
+ _handlePopperPlacementChange(data) {
+ if (data.originalPlacement !== data.placement) {
+ this._cleanTipClass()
+ this.addAttachmentClass(this._getAttachment(data.placement))
+ }
+ }
// static
<div class="container">
<h1>Popover <small>Bootstrap Visual Test</small></h1>
- <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
+ <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Default placement was on top but not enough place">
Popover on top
</button>