rytm-webflow 2.0.4 → 2.0.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rytm-webflow",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "rytm webflow pack - ASwap, ShowUp",
5
5
  "main": "scripts/index.js",
6
6
  "scripts": {
@@ -99,7 +99,7 @@ class ASwapDispatcher extends EventDispatcher {
99
99
  // swap if TITLE or META
100
100
  switch (el.nodeName.toLowerCase()) {
101
101
  case "title":
102
- document.title = el.innerHTML
102
+ document.title = el.innerText
103
103
  break;
104
104
  case "meta":
105
105
  const name = el.getAttribute("name")
@@ -99,6 +99,9 @@ class Controller {
99
99
  if (container) {
100
100
  container.classList.remove("as-hide")
101
101
  }
102
+ if (this.view) {
103
+ this.view.hidden(container);
104
+ }
102
105
  }
103
106
 
104
107
  /**
@@ -144,6 +147,9 @@ class Controller {
144
147
  if (container) {
145
148
  container.classList.remove("as-show")
146
149
  }
150
+ if (this.view) {
151
+ this.view.shown(container);
152
+ }
147
153
  }
148
154
 
149
155
 
@@ -19,6 +19,11 @@ class View {
19
19
  this.active = false;
20
20
  }
21
21
  /**
22
+ * view is hidden
23
+ **/
24
+ hidden(container) {
25
+ }
26
+ /**
22
27
  * prepare (before show)
23
28
  **/
24
29
  prepare(container) {
@@ -29,6 +34,11 @@ class View {
29
34
  show(container) {
30
35
  this.active = true;
31
36
  }
37
+ /**
38
+ * view is shown
39
+ **/
40
+ shown(container) {
41
+ }
32
42
  /**
33
43
  * images loading start
34
44
  * fired only if ControllerImgLoad is used