Преглед на файлове

Update scripts

customisations
alemart преди 10 месеца
родител
ревизия
fbd1bd7a27
променени са 2 файла, в които са добавени 9 реда и са изтрити 7 реда
  1. 7
    5
      dist/encantar.js
  2. 2
    2
      dist/encantar.min.js

+ 7
- 5
dist/encantar.js Целия файл

@@ -5,7 +5,7 @@
5 5
  * https://github.com/alemart/encantar-js
6 6
  *
7 7
  * @license LGPL-3.0-or-later
8
- * Date: 2024-10-20T01:13:15.146Z
8
+ * Date: 2024-10-20T05:43:39.143Z
9 9
  */
10 10
 (function webpackUniversalModuleDefinition(root, factory) {
11 11
 	if(typeof exports === 'object' && typeof module === 'object')
@@ -25836,7 +25836,7 @@ class ViewportResizer {
25836 25836
      * Trigger a resize event after a delay
25837 25837
      * @param delay in milliseconds
25838 25838
      */
25839
-    triggerResize(delay = 50) {
25839
+    triggerResize(delay = 100) {
25840 25840
         const event = new ViewportEvent('resize');
25841 25841
         if (delay <= 0) {
25842 25842
             this._viewport.dispatchEvent(event);
@@ -25968,20 +25968,22 @@ class BestFitResizeStrategy extends ImmersiveResizeStrategy {
25968 25968
         const subContainer = viewport._subContainer;
25969 25969
         const windowAspectRatio = window.innerWidth / window.innerHeight;
25970 25970
         const viewportAspectRatio = viewport._realSize.width / viewport._realSize.height;
25971
-        let width = 1, height = 1;
25971
+        let width = 1, height = 1, left = '0px', top = '0px';
25972 25972
         if (viewportAspectRatio <= windowAspectRatio) {
25973 25973
             height = window.innerHeight;
25974 25974
             width = Math.round(height * viewportAspectRatio);
25975 25975
             width -= width % 2;
25976
+            left = `calc(50% - ${width >>> 1}px)`;
25976 25977
         }
25977 25978
         else {
25978 25979
             width = window.innerWidth;
25979 25980
             height = Math.round(width / viewportAspectRatio);
25980 25981
             height -= height % 2;
25982
+            top = `calc(50% - ${height >>> 1}px)`;
25981 25983
         }
25982 25984
         subContainer.style.position = 'absolute';
25983
-        subContainer.style.left = `calc(50% - ${width >>> 1}px)`;
25984
-        subContainer.style.top = `calc(50% - ${height >>> 1}px)`;
25985
+        subContainer.style.left = left;
25986
+        subContainer.style.top = top;
25985 25987
         subContainer.style.width = width + 'px';
25986 25988
         subContainer.style.height = height + 'px';
25987 25989
         super.resize(viewport);

+ 2
- 2
dist/encantar.min.js
Файловите разлики са ограничени, защото са твърде много
Целия файл


Loading…
Отказ
Запис