lato 3.11.3 → 3.11.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f74224daab88d3ccd9e30a552503efaa04503a4e4e1bf103bf0aefa43a1d743
|
4
|
+
data.tar.gz: 1995b2071e0ef30bfdcad2259dd90b7500af23506ac63fe77375ee8955b19920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f22a9b7694ee48adbef3b63c1d02cf6ad00b4a719c71c2099576348c6726c5cf2edc7f9b6152d2213fc3dd7ffc9242ea29ac4fe96c3874a957a32e61707ed11b
|
7
|
+
data.tar.gz: e14da8bcb3bffadcc298a41ad48e47fcdfd631a7025574f7a19e4f1a4377e9f8c449ba82ca5005216ec1b5ef130ab1da4870edeaf217d1bf8b158a7650ea520c
|
@@ -16,21 +16,24 @@ export default class extends Controller {
|
|
16
16
|
this.tooltip = null
|
17
17
|
this.run()
|
18
18
|
|
19
|
-
window.addEventListener('resize', this.
|
19
|
+
window.addEventListener('resize', this.onDomChange.bind(this))
|
20
|
+
document.addEventListener('turbo:load', this.onDomChange.bind(this))
|
21
|
+
document.addEventListener('turbo:frame-load', this.onDomChange.bind(this))
|
20
22
|
}
|
21
23
|
|
22
24
|
disconnect() {
|
23
25
|
this.storeStatus()
|
24
26
|
|
25
27
|
if (this.tooltip) {
|
26
|
-
this.tooltip.hide()
|
27
28
|
this.tooltip.dispose()
|
28
29
|
this.tooltip = null
|
29
30
|
}
|
30
31
|
|
31
32
|
this.connected = false
|
32
33
|
|
33
|
-
window.removeEventListener('resize', this.
|
34
|
+
window.removeEventListener('resize', this.onDomChange.bind(this))
|
35
|
+
window.removeEventListener('turbo:load', this.onDomChange.bind(this))
|
36
|
+
window.removeEventListener('turbo:frame-load', this.onDomChange.bind(this))
|
34
37
|
}
|
35
38
|
|
36
39
|
itemTargetConnected(e) {
|
@@ -39,7 +42,6 @@ export default class extends Controller {
|
|
39
42
|
|
40
43
|
itemTargetDisconnected(e) {
|
41
44
|
if (this.tooltip && this.tooltip.itemKey === e.target.dataset.guideKey) {
|
42
|
-
this.tooltip.hide()
|
43
45
|
this.tooltip.dispose()
|
44
46
|
this.tooltip = null
|
45
47
|
}
|
@@ -98,7 +100,6 @@ export default class extends Controller {
|
|
98
100
|
item.element.addEventListener('shown.bs.tooltip', () => {
|
99
101
|
setTimeout(() => {
|
100
102
|
document.getElementById(tooltipCloseId).addEventListener('click', () => {
|
101
|
-
this.tooltip.hide()
|
102
103
|
this.tooltip.dispose()
|
103
104
|
this.tooltip = null
|
104
105
|
this.status[item.key] = true
|
@@ -129,10 +130,9 @@ export default class extends Controller {
|
|
129
130
|
* Events
|
130
131
|
*/
|
131
132
|
|
132
|
-
|
133
|
+
onDomChange(e) { // when page size changes (change of length of the document), we need to reposition the tooltip
|
133
134
|
if (this.tooltip) {
|
134
|
-
this.tooltip.
|
135
|
-
this.tooltip.show()
|
135
|
+
this.tooltip.update()
|
136
136
|
}
|
137
137
|
}
|
138
138
|
}
|
data/lib/lato/version.rb
CHANGED