@xuda.io/runtime-bundle 1.0.871 → 1.0.872

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.
@@ -8769,14 +8769,22 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8769
8769
  const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $div, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
8770
8770
  }
8771
8771
 
8772
- const parent_id = $div.parent().attr('xu-ui-id');
8773
- if (!UI_WORKER_OBJ.viewport_height_set_ids.includes(parent_id)) {
8774
- UI_WORKER_OBJ.viewport_height_set_ids.push(parent_id);
8775
- func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8776
- }
8772
+ // const parent_id = $div.parent().attr('xu-ui-id');
8773
+ // if (!UI_WORKER_OBJ.viewport_height_set_ids.includes(parent_id)) {
8774
+ // UI_WORKER_OBJ.viewport_height_set_ids.push(parent_id);
8775
+ // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8776
+ // }
8777
8777
 
8778
- if ($div.hasClass('viewport_height')) {
8778
+ // if ($div.hasClass('viewport_height')) {
8779
+ // $div.css('height', 'unset');
8780
+ // }
8781
+
8782
+ const height = $div.data().xuData.viewport_height;
8783
+ if (typeof height !== 'undefined') {
8779
8784
  $div.css('height', 'unset');
8785
+ } else {
8786
+ $div.data().xuData.viewport_height = $div.height();
8787
+ // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8780
8788
  }
8781
8789
  }
8782
8790
 
@@ -8785,7 +8793,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8785
8793
  set_viewport_height: async function () {
8786
8794
  const { $elm, height } = queue_obj?.paramsP || {};
8787
8795
 
8788
- // $elm.children().css('height', height);
8796
+ $elm.data().xuData.viewport_height = $div.height();
8789
8797
 
8790
8798
  $.each($elm.children(), function (key, elm) {
8791
8799
  if (!$(elm)[0].style.height && !$(elm).children().length) {
@@ -8770,14 +8770,22 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8770
8770
  const ret = await func.UI.screen.render_ui_tree(SESSION_ID, $div, nodeP.children[key], parent_infoP, paramsP, jobNoP, is_skeleton, Number(key), null, nodeP, null, $root_container);
8771
8771
  }
8772
8772
 
8773
- const parent_id = $div.parent().attr('xu-ui-id');
8774
- if (!UI_WORKER_OBJ.viewport_height_set_ids.includes(parent_id)) {
8775
- UI_WORKER_OBJ.viewport_height_set_ids.push(parent_id);
8776
- func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8777
- }
8773
+ // const parent_id = $div.parent().attr('xu-ui-id');
8774
+ // if (!UI_WORKER_OBJ.viewport_height_set_ids.includes(parent_id)) {
8775
+ // UI_WORKER_OBJ.viewport_height_set_ids.push(parent_id);
8776
+ // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8777
+ // }
8778
8778
 
8779
- if ($div.hasClass('viewport_height')) {
8779
+ // if ($div.hasClass('viewport_height')) {
8780
+ // $div.css('height', 'unset');
8781
+ // }
8782
+
8783
+ const height = $div.data().xuData.viewport_height;
8784
+ if (typeof height !== 'undefined') {
8780
8785
  $div.css('height', 'unset');
8786
+ } else {
8787
+ $div.data().xuData.viewport_height = $div.height();
8788
+ // func.UI.worker.add_to_queue(SESSION_ID, 'gui event', 'set_viewport_height', { $elm: $div.parent(), height: $div.height() }, null, null, paramsP.dsSessionP);
8781
8789
  }
8782
8790
  }
8783
8791
 
@@ -8786,7 +8794,7 @@ func.UI.worker.execute = async function (SESSION_ID, queue_obj) {
8786
8794
  set_viewport_height: async function () {
8787
8795
  const { $elm, height } = queue_obj?.paramsP || {};
8788
8796
 
8789
- // $elm.children().css('height', height);
8797
+ $elm.data().xuData.viewport_height = $div.height();
8790
8798
 
8791
8799
  $.each($elm.children(), function (key, elm) {
8792
8800
  if (!$(elm)[0].style.height && !$(elm).children().length) {