Skip to content
Snippets Groups Projects
Commit 818e0289 authored by Guillaume Chau's avatar Guillaume Chau
Browse files

fix: use Popper.placements

parent d5e9f788
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@
import Popper from 'popper.js'
import { supportsPassive } from '../util/support'
import { getDefaultConfig } from '../config'
import { placement } from '../const'
let isIOS = false
if (typeof window !== 'undefined' && typeof navigator !== 'undefined') {
......@@ -57,7 +56,7 @@ export default {
default () {
return getDefaultConfig(this.theme, 'placement')
},
validator: value => placement.includes(value),
validator: value => Popper.placements.includes(value),
},
delay: {
......
// Possible Popper.js positions
export const placement = [
'auto',
'auto-start',
'auto-end',
'top',
'top-start',
'top-end',
'right',
'right-start',
'right-end',
'bottom',
'bottom-start',
'bottom-end',
'left',
'left-start',
'left-end',
]
import Vue from 'vue'
import { placement } from '../const'
import Popper from 'popper.js'
import TooltipDirective from '../components/TooltipDirective.vue'
import { getDefaultConfig } from '../config'
......@@ -11,7 +11,7 @@ const TARGET_CLASS = `v-popper--has-tooltip`
export function getPlacement (options, modifiers) {
var result = options.placement
if (!result && modifiers) {
for (const pos of placement) {
for (const pos of Popper.placements) {
if (modifiers[pos]) {
result = pos
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment