()
| 54 | } |
| 55 | |
| 56 | private show(): void { |
| 57 | if (!this.text) { |
| 58 | return; |
| 59 | } |
| 60 | if (!this.root.parentElement) { |
| 61 | document.body.appendChild(this.root); |
| 62 | } |
| 63 | if (!this.popper) { |
| 64 | this.popper = createPopper(this.target, this.root, { |
| 65 | placement: this.options.placement ?? 'top', |
| 66 | modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] |
| 67 | }); |
| 68 | } else { |
| 69 | this.popper.update(); |
| 70 | } |
| 71 | this.root.classList.add('visible'); |
| 72 | } |
| 73 | |
| 74 | private hide(): void { |
| 75 | this.root.classList.remove('visible'); |
no test coverage detected