@hkdigital/lib-core 0.5.32 → 0.5.33

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.
@@ -189,36 +189,40 @@
189
189
  });
190
190
  }
191
191
 
192
- // Calculate game dimensions for both orientations
193
- // Orientation is determined by matchMedia/screen.orientation.angle,
194
- // not by dimension comparison
195
- gameWidthOnLandscape = getGameWidthOnLandscape({
196
- windowWidth: availWidth,
197
- windowHeight: availHeight,
198
- aspectOnLandscape
199
- });
200
-
201
- if( aspectOnLandscape )
202
- {
203
- gameHeightOnLandscape = gameWidthOnLandscape / aspectOnLandscape;
204
- }
205
- else {
206
- gameHeightOnLandscape = availHeight;
207
- }
208
-
209
- gameWidthOnPortrait = getGameWidthOnPortrait({
210
- windowWidth: availWidth,
211
- windowHeight: availHeight,
212
- aspectOnPortrait
213
- });
192
+ if (availWidth > availHeight) {
193
+ // Calculate game dimensions for both orientations
194
+ // Orientation is determined by matchMedia/screen.orientation.angle,
195
+ // not by dimension comparison
196
+ gameWidthOnLandscape = getGameWidthOnLandscape({
197
+ windowWidth: availWidth,
198
+ windowHeight: availHeight,
199
+ aspectOnLandscape
200
+ });
214
201
 
215
- if( aspectOnPortrait )
216
- {
217
- gameHeightOnPortrait = gameWidthOnPortrait / aspectOnPortrait;
202
+ if( aspectOnLandscape )
203
+ {
204
+ gameHeightOnLandscape = gameWidthOnLandscape / aspectOnLandscape;
205
+ }
206
+ else {
207
+ gameHeightOnLandscape = availHeight;
208
+ }
218
209
  }
219
210
  else {
220
- gameHeightOnPortrait = availHeight;
211
+ gameWidthOnPortrait = getGameWidthOnPortrait({
212
+ windowWidth: availWidth,
213
+ windowHeight: availHeight,
214
+ aspectOnPortrait
215
+ });
216
+
217
+ if( aspectOnPortrait )
218
+ {
219
+ gameHeightOnPortrait = gameWidthOnPortrait / aspectOnPortrait;
220
+ }
221
+ else {
222
+ gameHeightOnPortrait = availHeight;
223
+ }
221
224
  }
225
+
222
226
  });
223
227
 
224
228
  let show = $state(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hkdigital/lib-core",
3
- "version": "0.5.32",
3
+ "version": "0.5.33",
4
4
  "author": {
5
5
  "name": "HKdigital",
6
6
  "url": "https://hkdigital.nl"