@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.
package/dist/file-list CHANGED
@@ -1,9 +1,9 @@
1
- eclipse-scout-core-111d2d090dfd2183238f.min.js
2
- eclipse-scout-core-111d2d090dfd2183238f.min.js.map
3
- eclipse-scout-core-theme-dark-fd0e080c10f65e67b68b.min.css
1
+ eclipse-scout-core-b11dde8e4ac1367f5a06.min.js
2
+ eclipse-scout-core-b11dde8e4ac1367f5a06.min.js.map
3
+ eclipse-scout-core-theme-dark-0d9d468e5722f73f5075.min.css
4
4
  eclipse-scout-core-theme-dark.css
5
5
  eclipse-scout-core-theme-dark.css.map
6
- eclipse-scout-core-theme-f3a61fbc12acf8e27fcc.min.css
6
+ eclipse-scout-core-theme-db0af3fa95956b820bfc.min.css
7
7
  eclipse-scout-core-theme.css
8
8
  eclipse-scout-core-theme.css.map
9
9
  eclipse-scout-core.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-scout/core",
3
- "version": "22.0.29",
3
+ "version": "22.0.33",
4
4
  "description": "Eclipse Scout runtime",
5
5
  "author": "BSI Business Systems Integration AG",
6
6
  "homepage": "https://www.eclipse.org/scout",
@@ -26,7 +26,7 @@
26
26
  "src"
27
27
  ],
28
28
  "devDependencies": {
29
- "@eclipse-scout/cli": "22.0.29",
29
+ "@eclipse-scout/cli": "22.0.33",
30
30
  "@eclipse-scout/releng": "^22.0.0",
31
31
  "jasmine-core": "3.10.1",
32
32
  "jasmine-ajax": "4.0.0",
@@ -322,6 +322,7 @@
322
322
  &.selected {
323
323
  display: flex;
324
324
  flex-wrap: wrap; // Move detail menubar to next line
325
+ background-clip: content-box; // selection background shines through on the bottom of the node sometimes when zoomed -> makes it slightly better
325
326
  }
326
327
 
327
328
  &.child-of-selected.animate-prev-selected {
@@ -23,7 +23,7 @@ export default class OutlineLayout extends TreeLayout {
23
23
 
24
24
  super._layout($container);
25
25
 
26
- containerSize = htmlContainer.availableSize()
26
+ containerSize = htmlContainer.availableSize({exact: true})
27
27
  .subtract(htmlContainer.insets());
28
28
 
29
29
  if (this.outline.embedDetailContent) {
@@ -31,7 +31,7 @@ export default class PageLayout extends AbstractLayout {
31
31
  detailMenuBarHeight = 0,
32
32
  textWidth = 0;
33
33
 
34
- containerSize = htmlContainer.availableSize()
34
+ containerSize = htmlContainer.availableSize({exact: true}) // exact is important to calculate text width correctly and to prevent node menubar from wrapping
35
35
  .subtract(htmlContainer.insets());
36
36
  textWidth = containerSize.width;
37
37
 
@@ -93,7 +93,9 @@ export default class PageLayout extends AbstractLayout {
93
93
  // needs a width to be able to calculate the pref height
94
94
  textHeight = graphics.prefSize($text, {
95
95
  includeMargin: true,
96
- widthHint: textWidth
96
+ widthHint: textWidth,
97
+ enforceSizeHints: true,
98
+ exact: true
97
99
  }).height;
98
100
 
99
101
  if ($icon.length > 0) {
@@ -106,6 +108,7 @@ export default class PageLayout extends AbstractLayout {
106
108
  }
107
109
  if (this.outline.detailContent) {
108
110
  let htmlDetailContent = this.outline.detailContent.htmlComp;
111
+ options = $.extend({}, options, {enforceSizeHints: true, exact: true});
109
112
  detailContentPrefSize = htmlDetailContent.prefSize(options).add(htmlDetailContent.margins());
110
113
  }
111
114
 
@@ -8,7 +8,7 @@
8
8
  * Contributors:
9
9
  * BSI Business Systems Integration AG - initial API and implementation
10
10
  */
11
- import {arrays, Device, Dimension, Insets, Point, Rectangle, scout, scrollbars} from '../index';
11
+ import {arrays, Dimension, Insets, objects, Point, Rectangle, scout, scrollbars} from '../index';
12
12
  import $ from 'jquery';
13
13
 
14
14
  /**
@@ -35,6 +35,10 @@ import $ from 'jquery';
35
35
  *
36
36
  * heightHint undefined Same as 'widthHint' but for the height.
37
37
  *
38
+ * enforceSizeHints false Sets min/max-width/height in addition to with width/height if widthHint resp. heightHint is set.
39
+ * The browser sometimes makes the element smaller or larger than specified by width/height, especially in a flex container.
40
+ * To prevent that, set this option to true. Default is false, but may change in the future.
41
+ *
38
42
  * restoreScrollPositions true By default, the $elem's scrolling position is saved and restored
39
43
  * during the execution of this method (because applying
40
44
  * intermediate styles for measurement might change the current
@@ -96,6 +100,16 @@ export function prefSize($elem, options) {
96
100
  'width': newWidth,
97
101
  'height': newHeight
98
102
  };
103
+ if (scout.nvl(options.enforceSizeHints, false)) {
104
+ if (objects.isNumber(newWidth)) {
105
+ cssProperties['max-width'] = newWidth;
106
+ cssProperties['min-width'] = newWidth;
107
+ }
108
+ if (objects.isNumber(newHeight)) {
109
+ cssProperties['max-height'] = newHeight;
110
+ cssProperties['min-height'] = newHeight;
111
+ }
112
+ }
99
113
 
100
114
  // modify properties which prevent reading the preferred size
101
115
  $elem.css(cssProperties);