MCPcopy
hub / github.com/Akryum/floating-vue / getOptions

Function getOptions

packages/floating-vue/src/directives/v-tooltip.ts:26–40  ·  view source on GitHub ↗
(el, value, modifiers)

Source from the content-addressed store, hash-verified

24}
25
26export function getOptions (el, value, modifiers) {
27 let options
28 const type = typeof value
29 if (type === 'string') {
30 options = { content: value }
31 } else if (value && type === 'object') {
32 options = value
33 } else {
34 options = { content: false }
35 }
36 options.placement = getPlacement(options, modifiers)
37 options.targetNodes = () => [el]
38 options.referenceNode = () => el
39 return options
40}
41
42interface Directive {
43 id: number

Callers 2

createTooltipFunction · 0.85
bindFunction · 0.85

Calls 1

getPlacementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…