@xuda.io/runtime-bundle 1.0.845 → 1.0.847

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.
@@ -24718,7 +24718,7 @@ var SCREEN_BLOCKER_OBJ = {};
24718
24718
  var IS_PROGRESS_SCREEN_OPEN = null;
24719
24719
  // var UI_ENGINE_OBJ = null;
24720
24720
 
24721
- var UI_WORKER_OBJ = { jobs: [], num: 9000 };
24721
+ var UI_WORKER_OBJ = { jobs: [], num: 9000, cache: {} };
24722
24722
 
24723
24723
  glb.html5_events_handler = [
24724
24724
  'onabort',
@@ -34430,7 +34430,7 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34430
34430
  $(entry.target).trigger('outViewport');
34431
34431
 
34432
34432
  // Optional: stop observing once triggered
34433
- observer_outViewport.unobserve(entry.target);
34433
+ // observer_outViewport.unobserve(entry.target);
34434
34434
  }
34435
34435
  });
34436
34436
  },
@@ -34445,16 +34445,22 @@ func.UI.screen.render_ui_tree = async function (SESSION_ID, $container, nodeP, p
34445
34445
 
34446
34446
  if (nodeP?.attributes?.['xu-viewport'] == 'true') {
34447
34447
  $div.on('inViewport', function () {
34448
- if ($div.children().length) return;
34449
-
34450
- hover_in($div);
34451
-
34452
- func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container }, null, null, paramsP.dsSessionP);
34448
+ if ($div.children().length) {
34449
+ $div.removeClass('skeleton');
34450
+ return;
34451
+ }
34453
34452
 
34453
+ if (UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]) {
34454
+ $div.html(UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')]);
34455
+ } else {
34456
+ hover_in($div);
34457
+ func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'render_viewport', { $div, nodeP, parent_infoP, $root_container, paramsP, jobNoP, is_skeleton, keyP, refreshed_ds, parent_nodeP, check_existP, $container }, null, null, paramsP.dsSessionP);
34458
+ }
34454
34459
  observer_outViewport.observe($div[0]);
34455
34460
  });
34456
34461
 
34457
34462
  $div.on('outViewport', function () {
34463
+ UI_WORKER_OBJ.cache[$div.attr('xu-ui-id')] = $div.clone();
34458
34464
  $div.empty();
34459
34465
  $div.addClass('skeleton');
34460
34466
  observer_inViewport.observe($div[0]);