@cloudron/pankow 3.6.3 → 3.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/tooltip.js +5 -1
package/package.json
CHANGED
package/tooltip.js
CHANGED
|
@@ -38,6 +38,8 @@ function isElementHidden(element) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
function remove(key, target) {
|
|
41
|
+
if (!tooltips[key]) return;
|
|
42
|
+
|
|
41
43
|
if (tooltips[key].element) tooltips[key].element.remove();
|
|
42
44
|
|
|
43
45
|
tooltips[key].element = null;
|
|
@@ -77,6 +79,7 @@ function mounted(el, binding, vnode) {
|
|
|
77
79
|
};
|
|
78
80
|
|
|
79
81
|
el.addEventListener('mouseenter', () => {
|
|
82
|
+
if (!tooltips[key]) return;
|
|
80
83
|
if (!tooltips[key].value) return;
|
|
81
84
|
|
|
82
85
|
const element = document.createElement('div');
|
|
@@ -105,7 +108,8 @@ function mounted(el, binding, vnode) {
|
|
|
105
108
|
}
|
|
106
109
|
|
|
107
110
|
function updated(el, binding, vnode) {
|
|
108
|
-
if (!
|
|
111
|
+
if (!tooltips[vnode.ctx.uid]) return;
|
|
112
|
+
if (!binding.value) return remove(vnode.ctx.uid, el);
|
|
109
113
|
|
|
110
114
|
tooltips[vnode.ctx.uid].value = binding.value;
|
|
111
115
|
|