@4site/engrid-scripts 0.19.20 → 0.19.21
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/dist/iframe.js +10 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/iframe.js
CHANGED
|
@@ -74,6 +74,10 @@ export class iFrame {
|
|
|
74
74
|
: 0;
|
|
75
75
|
this.logger.log(`iFrame Event 'scrollTo' - Position of top of first error ${scrollTo} px`); // check the message is being sent correctly
|
|
76
76
|
window.parent.postMessage({ scrollTo }, "*");
|
|
77
|
+
// Send the height of the iFrame
|
|
78
|
+
window.setTimeout(() => {
|
|
79
|
+
this.sendIframeHeight();
|
|
80
|
+
}, 100);
|
|
77
81
|
});
|
|
78
82
|
}
|
|
79
83
|
else {
|
|
@@ -91,6 +95,12 @@ export class iFrame {
|
|
|
91
95
|
if (iframe) {
|
|
92
96
|
if (event.data.hasOwnProperty("frameHeight")) {
|
|
93
97
|
iframe.style.height = event.data.frameHeight + "px";
|
|
98
|
+
if (event.data.frameHeight > 0) {
|
|
99
|
+
iframe.classList.add("loaded");
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
iframe.classList.remove("loaded");
|
|
103
|
+
}
|
|
94
104
|
}
|
|
95
105
|
// Old scroll event logic "scroll", scrolls to correct iframe?
|
|
96
106
|
else if (event.data.hasOwnProperty("scroll") &&
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AppVersion = "0.19.
|
|
1
|
+
export declare const AppVersion = "0.19.21";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AppVersion = "0.19.
|
|
1
|
+
export const AppVersion = "0.19.21";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4site/engrid-scripts",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.21",
|
|
4
4
|
"description": "Scripts for the ENGRID Project",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"strongly-typed-events": "^2.0.9"
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/4site-interactive-studios/engrid#readme",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "1b8ff2b4d1fd0a1f16f1ac951a0793a2d7a28233",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"nodemon": "^2.0.20"
|
|
31
31
|
}
|