@everymatrix/general-navigation-bar 1.27.10 → 1.28.0
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": "@everymatrix/general-navigation-bar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"main": "dist/general-navigation-bar.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d291acb27fcd4cf8217ec1c98666c02bfb1aea9f"
|
|
39
39
|
}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
const getMobileBottomMenu = ():void => {
|
|
88
|
-
|
|
88
|
+
orientationChangeHandler();
|
|
89
89
|
|
|
90
90
|
isLoading = true;
|
|
91
91
|
let device = getDevice(userAgent);
|
|
@@ -193,11 +193,22 @@
|
|
|
193
193
|
setLocale(lang);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
const orientationChangeHandler = (): void => {
|
|
197
|
+
mobileLandscapeView = isMobile && window.innerHeight / window.innerWidth < 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
196
200
|
onMount(() => {
|
|
197
201
|
window.addEventListener('message', messageHandler, false);
|
|
198
202
|
|
|
203
|
+
if (isMobile) {
|
|
204
|
+
window.screen.orientation.addEventListener('change', orientationChangeHandler);
|
|
205
|
+
}
|
|
206
|
+
|
|
199
207
|
return () => {
|
|
200
208
|
window.removeEventListener('message', messageHandler);
|
|
209
|
+
if (isMobile) {
|
|
210
|
+
window.screen.orientation.removeEventListener('change', orientationChangeHandler);
|
|
211
|
+
}
|
|
201
212
|
}
|
|
202
213
|
});
|
|
203
214
|
|
|
@@ -211,7 +222,7 @@
|
|
|
211
222
|
</script>
|
|
212
223
|
|
|
213
224
|
{#if !isLoading && isMobile && showNavigation}
|
|
214
|
-
<div class="NavigationWrapper {mobileLandscapeView ? '' : '
|
|
225
|
+
<div class="NavigationWrapper {mobileLandscapeView ? 'NavigationWrapperLandScape' : ''}" bind:this={customStylingContainer}>
|
|
215
226
|
<div class="NavigationPanel">
|
|
216
227
|
{#if !navigationBarSimple}
|
|
217
228
|
<div class="NavigationWindow {navigationWindowOpened ? 'NavigationWindowOpened' : ''}">
|