@eclipse-scout/core 22.0.29 → 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