@eclipse-scout/core 22.0.26 → 22.0.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.
@@ -16458,7 +16458,9 @@ class OutlineLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.TreeLayout {
16458
16458
 
16459
16459
  super._layout($container);
16460
16460
 
16461
- containerSize = htmlContainer.availableSize().subtract(htmlContainer.insets());
16461
+ containerSize = htmlContainer.availableSize({
16462
+ exact: true
16463
+ }).subtract(htmlContainer.insets());
16462
16464
 
16463
16465
  if (this.outline.embedDetailContent) {
16464
16466
  let selectedNode = this.outline.selectedNodes[0];
@@ -16842,7 +16844,10 @@ class PageLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractLayout {
16842
16844
  detailMenuBar = this.outline.detailMenuBar,
16843
16845
  detailMenuBarHeight = 0,
16844
16846
  textWidth = 0;
16845
- containerSize = htmlContainer.availableSize().subtract(htmlContainer.insets());
16847
+ containerSize = htmlContainer.availableSize({
16848
+ exact: true
16849
+ }) // exact is important to calculate text width correctly and to prevent node menubar from wrapping
16850
+ .subtract(htmlContainer.insets());
16846
16851
  textWidth = containerSize.width;
16847
16852
 
16848
16853
  if ($icon.length > 0) {
@@ -16904,7 +16909,9 @@ class PageLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractLayout {
16904
16909
 
16905
16910
  textHeight = _index__WEBPACK_IMPORTED_MODULE_0__.graphics.prefSize($text, {
16906
16911
  includeMargin: true,
16907
- widthHint: textWidth
16912
+ widthHint: textWidth,
16913
+ enforceSizeHints: true,
16914
+ exact: true
16908
16915
  }).height;
16909
16916
 
16910
16917
  if ($icon.length > 0) {
@@ -16919,6 +16926,10 @@ class PageLayout extends _index__WEBPACK_IMPORTED_MODULE_0__.AbstractLayout {
16919
16926
 
16920
16927
  if (this.outline.detailContent) {
16921
16928
  let htmlDetailContent = this.outline.detailContent.htmlComp;
16929
+ options = $.extend({}, options, {
16930
+ enforceSizeHints: true,
16931
+ exact: true
16932
+ });
16922
16933
  detailContentPrefSize = htmlDetailContent.prefSize(options).add(htmlDetailContent.margins());
16923
16934
  }
16924
16935
 
@@ -63398,6 +63409,10 @@ __webpack_require__.r(__webpack_exports__);
63398
63409
  *
63399
63410
  * heightHint undefined Same as 'widthHint' but for the height.
63400
63411
  *
63412
+ * enforceSizeHints false Sets min/max-width/height in addition to with width/height if widthHint resp. heightHint is set.
63413
+ * The browser sometimes makes the element smaller or larger than specified by width/height, especially in a flex container.
63414
+ * To prevent that, set this option to true. Default is false, but may change in the future.
63415
+ *
63401
63416
  * restoreScrollPositions true By default, the $elem's scrolling position is saved and restored
63402
63417
  * during the execution of this method (because applying
63403
63418
  * intermediate styles for measurement might change the current
@@ -63458,7 +63473,20 @@ function prefSize($elem, options) {
63458
63473
  let cssProperties = {
63459
63474
  'width': newWidth,
63460
63475
  'height': newHeight
63461
- }; // modify properties which prevent reading the preferred size
63476
+ };
63477
+
63478
+ if (_index__WEBPACK_IMPORTED_MODULE_0__.scout.nvl(options.enforceSizeHints, false)) {
63479
+ if (_index__WEBPACK_IMPORTED_MODULE_0__.objects.isNumber(newWidth)) {
63480
+ cssProperties['max-width'] = newWidth;
63481
+ cssProperties['min-width'] = newWidth;
63482
+ }
63483
+
63484
+ if (_index__WEBPACK_IMPORTED_MODULE_0__.objects.isNumber(newHeight)) {
63485
+ cssProperties['max-height'] = newHeight;
63486
+ cssProperties['min-height'] = newHeight;
63487
+ }
63488
+ } // modify properties which prevent reading the preferred size
63489
+
63462
63490
 
63463
63491
  $elem.css(cssProperties); // measure
63464
63492
 
@@ -119079,7 +119107,7 @@ class Tree extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
119079
119107
  let scrollTop = this.$data[0].scrollTop;
119080
119108
  let scrollLeft = this.$data[0].scrollLeft;
119081
119109
 
119082
- if (this.scrollTop !== scrollTop) {
119110
+ if (this.scrollTop !== scrollTop && this.rendered) {
119083
119111
  this._renderViewport();
119084
119112
  }
119085
119113
 
@@ -120759,10 +120787,7 @@ class Tree extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
120759
120787
  _addToVisibleFlatListNoCheck(node, insertIndex, animatedRendering) {
120760
120788
  _index__WEBPACK_IMPORTED_MODULE_0__.arrays.insert(this.visibleNodesFlat, node, insertIndex);
120761
120789
  this.visibleNodesMap[node.id] = true;
120762
-
120763
- if (this.rendered) {
120764
- this.showNode(node, animatedRendering, insertIndex);
120765
- }
120790
+ this.showNode(node, animatedRendering, insertIndex);
120766
120791
  }
120767
120792
 
120768
120793
  scrollTo(node, options) {
@@ -121036,10 +121061,18 @@ class Tree extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
121036
121061
  nodes[i].childNodeIndex = i;
121037
121062
  }
121038
121063
  }
121064
+ /**
121065
+ * @param {TreeNode} [parentNode]
121066
+ */
121067
+
121039
121068
 
121040
121069
  insertNode(node, parentNode) {
121041
121070
  this.insertNodes([node], parentNode);
121042
121071
  }
121072
+ /**
121073
+ * @param {TreeNode} [parentNode]
121074
+ */
121075
+
121043
121076
 
121044
121077
  insertNodes(nodes, parentNode) {
121045
121078
  nodes = _index__WEBPACK_IMPORTED_MODULE_0__.arrays.ensure(nodes).slice();
@@ -122043,7 +122076,7 @@ class Tree extends _index__WEBPACK_IMPORTED_MODULE_0__.Widget {
122043
122076
  }
122044
122077
 
122045
122078
  hideNode(node, useAnimation, suppressDetachHandling) {
122046
- if (!node.attached) {
122079
+ if (!this.rendered || !node.attached) {
122047
122080
  return;
122048
122081
  }
122049
122082