@widelab-nc/widelab 1.1.14 → 1.1.16
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/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/index.js +24 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1032,6 +1032,15 @@ window.closeContactModal = function() {
|
|
|
1032
1032
|
contactFormOpen.timeScale(1).reverse();;
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
|
+
// Close contact modal on ESC click
|
|
1036
|
+
window.closeContactModalOnEsc = function(e) {
|
|
1037
|
+
document.addEventListener('keydown', function(event) {
|
|
1038
|
+
if (event.key === "Escape") {
|
|
1039
|
+
window.closeContactModal();
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1035
1044
|
// Form animation
|
|
1036
1045
|
// Hero animation on load
|
|
1037
1046
|
window.successMsgAnimation = function(e) {
|
|
@@ -1101,13 +1110,26 @@ window.contactUsHide = function(e) {
|
|
|
1101
1110
|
duration: 0.15,
|
|
1102
1111
|
ease: 'loader2',
|
|
1103
1112
|
scrollTrigger: {
|
|
1104
|
-
trigger: '#
|
|
1105
|
-
start: 'top
|
|
1113
|
+
trigger: '#bottomWrapperOverlay',
|
|
1114
|
+
start: 'top center',
|
|
1106
1115
|
toggleActions: 'play none none reverse',
|
|
1107
1116
|
},
|
|
1108
1117
|
}));
|
|
1109
1118
|
}
|
|
1110
1119
|
|
|
1120
|
+
// Refresh Gsap scrollTriggers
|
|
1121
|
+
window.scrollTriggerRefresh = function() {
|
|
1122
|
+
function refreshScrollTrigger() {
|
|
1123
|
+
ScrollTrigger.refresh();
|
|
1124
|
+
}
|
|
1125
|
+
const observer = new MutationObserver(refreshScrollTrigger);
|
|
1126
|
+
const targetNode = document.querySelector('.section.is-post-body');
|
|
1127
|
+
const config = { attributes: true, childList: true, subtree: true };
|
|
1128
|
+
observer.observe(targetNode, config);
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
|
|
1132
|
+
|
|
1111
1133
|
// !!!!!!!!! Keep this Alpine init at the end !!!!!!!!!
|
|
1112
1134
|
window.Webflow ||= [];
|
|
1113
1135
|
window.Webflow.push(() => {
|